+getDefinitions doc pos = do
+ let params = TextDocumentPositionParams doc pos
+ rsp <- request TextDocumentDefinition params :: Session DefinitionResponse
+ case getResponseResult rsp of
+ SingleLoc loc -> pure [loc]
+ MultiLoc locs -> pure locs
+
+-- | Returns the type definition(s) for the term at the specified position.
+getTypeDefinitions :: TextDocumentIdentifier -- ^ The document the term is in.
+ -> Position -- ^ The position the term is at.
+ -> Session [Location] -- ^ The location(s) of the definitions
+getTypeDefinitions doc pos =