File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed
Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff 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}
3736getKnownAgdaLib :: LSP. NormalizedUri -> Model -> Maybe AgdaLib
3837getKnownAgdaLib 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
4640withAgdaLib :: AgdaLib -> Model -> Model
4741withAgdaLib lib model = model {_modelAgdaLibs = lib : _modelAgdaLibs model}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments