Skip to content

Commit 56c2203

Browse files
committed
Really actually use new lib resolution
1 parent 65614f1 commit 56c2203

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/Server/Model.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module Server.Model
22
( Model (Model),
33
empty,
44
getKnownAgdaLib,
5-
getAgdaLib,
65
withAgdaLib,
76
getAgdaFile,
87
setAgdaFile,
@@ -37,11 +36,6 @@ agdaFiles f a = f (_modelAgdaFiles a) <&> \x -> a {_modelAgdaFiles = x}
3736
getKnownAgdaLib :: LSP.NormalizedUri -> Model -> Maybe AgdaLib
3837
getKnownAgdaLib uri = find (`isAgdaLibForUri` uri) . _modelAgdaLibs
3938

40-
-- | Get the Agda library for the given URI if known. Otherwise, get a generic
41-
-- default Agda library.
42-
getAgdaLib :: (MonadIO m) => LSP.NormalizedUri -> Model -> m AgdaLib
43-
getAgdaLib uri = maybe initAgdaLib return . getKnownAgdaLib uri
44-
4539
-- | Add an 'AgdaLib' to the model
4640
withAgdaLib :: AgdaLib -> Model -> Model
4741
withAgdaLib lib model = model {_modelAgdaLibs = lib : _modelAgdaLibs model}

src/Server/Model/Handler.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ requestHandlerWithAgdaFile m handlerWithAgdaFile = LSP.requestHandler m $ \req r
100100
let message = "Request for unknown Agda file at URI: " <> LSP.getUri uri
101101
responder $ Left $ LSP.TResponseError (LSP.InR LSP.ErrorCodes_InvalidParams) message Nothing
102102
Just agdaFile -> do
103-
agdaLib <- Model.getAgdaLib normUri model
103+
agdaLib <- findAgdaLib normUri
104104
let responderWithAgdaFile = lift . responder
105105
let handler = tryTC $ runWithAgdaFileT agdaLib agdaFile $ handlerWithAgdaFile req responderWithAgdaFile
106106

0 commit comments

Comments
 (0)