In favour of


Haskell library for the Microsoft Language Server Protocol

Version on this page:
LTS Haskell 18.28:
Stackage Nightly 2021-06-14:
Latest on Hackage:

See all snapshots haskell-lsp appears in

MIT licensed by Alan Zimmerman
Maintained by
This version can be pinned in stack with:haskell-lsp-,4670

CircleCI Hackage


Haskell library for the Microsoft Language Server Protocol

Warning: this library and its associated ecosystem is under development at the moment. So do not have high expectations, it is not ready for casual use.


To see this library in use you need to install the haskell-ide-engine

git clone --recursive
cd haskell-ide-engine
stack install

This will put the hie executable in your path.

Then, run the plugin in vscode:

git clone
cd vscode-hie-server
code .

In vscode, press F5 to run the extension in development mode.

You can see a log from hie by doing

tail -F /tmp/hie-vscode.log

There are also facilities on the code to send back language-server-protocol log and show events.

It can also be used with emacs, see

Using the example server

stack install

will generate a lsp-hello executable.

Changing the server to be called in the vscode-hie-server plugin from hie to lsp-hello will run the example server instead of hie.

Likewise, changing the executable in lsp-haskell for emacs.

Useful links

Other resource

See #haskell-ide-engine on IRC freenode


Revision history for haskell-lsp – 2019-04-11

  • Add applyTextEdit and editTextEdit helpers
  • Set the typedefinitionProvider capability if it has a handler
  • Add stack files for GHC 8.4.4 and 8.6.4 – 2019-02-28

  • Update Handler to delegate to typeDefinitionHandler instead of definitionHandler. by @fendor – 2018-10-27

  • Support GHC 8.6.1 by loosening constraints. Via @domenkozar – 2018-09-08

  • Update Hover to be a nullable according to spec
  • Move Lenses into a separate module, Language.Haskell.LSP.Types.Lens – 2018-08-14

  • Update CompletionItem
  • Add commitCharacters field
  • Add MarkupContent option for documentation
  • Add preselect field
  • Add CompletionContext
  • Add new server capabilities
  • Add workspace folder support
  • Add document color and color presentation
  • Add folding range support
  • Add goto type support
  • s/TH/Types/g
  • Move all types into haskell-lsp-types
  • Hide Language.Haskell.LSP.TH.DataTypesJSON - Use Language.Haskell.LSP.Types instead
  • Add lenses for Language.Haskell.LSP.Types.Capabilities – 2018-08-06

  • Add new DocumentSymbol type and heirarchal support
  • Rename CommandOrCodeAction to CAResult
  • Add handler for ‘textDocument/implementation’ request from client
  • Bump stack resolvers for lts 11 and lts 12 – 2018-08-03

  • Update Command.arguments to match specification
  • Update ClientCapabilities to v3.10
  • Add MarkupContent
  • Add new CompletionKinds
  • Add new SymbolKinds
  • Add preset version capabilities – 2018-07-10

  • CodeAction support as per v3.8 of the specification, by @Bubba
  • Update VersionedTextDocumentIdentifier to match specification, by @Bubba

  • Handle TextDocumentSync fallbacks with new TDS type. – 2018-99-99

  • GHC 8.4.3 support
  • Apply changes to the VFS in the order received in a message. This fixes vscode undo behaviour. By @Bubba
  • Introduce additional error codes as per the LSP spec. By @Bubba
  • Add preliminary support for recording LSP traffic for later playback in test scenarios. By @Bubba – 2018-05-04

  • Make Diagnostic relatedInformation optional, as per the LSP Spec. By @Bubba. – 2018-05-02

  • Support GHC 8.4.2
  • Split into two packages
  • Language.Haskell.LSP.TH.DataTypesJSON becomes Language.Haskell.LSP.Types
  • Diagnostic now has _relatedInformation. Can default it to mempty. via @AlexeyRaga
  • Correct the name of the DidChangeWatchedFilesParams field, by @robrix
  • Make sure to escape URIs properly for Windows file paths Fixes #75. Also added a couple of pretty dumb tests!, by @johnsonw – 2017-12-27

  • Built with LTS 10.1 (stack)
  • Don’t escape semicolons after drive letters by @nponeccop
  • Add Foldable and Traversable instance to List by @noughtmare – 2017-11-23

  • Major changes as implementation continued. Now seems stable, used in haskell-ide-engine – 2017-07-19

  • First version. Implements version 3 of the Microsoft Language Server Protocol