-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Consider, for example: https://hackage.haskell.org/package/lsp-2.7.0.1/docs/Language-LSP-Server.html#v:interpretHandler
The code snippet reads:
ServerDefinition { ...
, doInitialize = env _req -> pure $ Right env
, interpretHandler = env -> Iso
(runLspT env) -- how to convert from IO ~> m
liftIO -- how to convert from m ~> IO
}
Making people wonder what strange new language extension syntax that may be. (Arrows perhaps?)
But looking at the source, it turns out, it is just lambdas:
-- @
-- ServerDefinition { ...
-- , doInitialize = \env _req -> pure $ Right env
-- , interpretHandler = \env -> Iso
-- (runLspT env) -- how to convert from IO ~> m
-- liftIO -- how to convert from m ~> IO
-- }
-- @
It seems the backslashes got eaten due to an escaping mechanism in the documentation generator.
This is a problem throughout all of the documentation.
So I kindly ask if you could fix that, so it becomes understandable? :)
(BTW: I very much miss an actual guide on how to use this. A reference documentation is of course nice, but an actual guide/howto/intro, even if short, would make it possible to understand how it is meant to be used in its entirety. Not even the library and functions to start with is clear as it is, and must be dug up. Unfortunately this is a common problem with Haskell package documentation. Maybe while we’re at it, a quick thing could be added. haskell-language-server is really way too large to serve as an example for a beginner. :-/)