Update README.md
authorLuke Lau <luke_lau@icloud.com>
Fri, 8 Jun 2018 20:43:02 +0000 (16:43 -0400)
committerGitHub <noreply@github.com>
Fri, 8 Jun 2018 20:43:02 +0000 (16:43 -0400)
README.md

index e58ae1734dc2a46658aefe80dc9aa4cf888945e5..f866ccfcc30af7ff000583314e73bae5813aaefb 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,2 +1,15 @@
 # haskell-lsp-test [![Build Status](https://travis-ci.com/Bubba/haskell-lsp-test.svg?branch=master)](https://travis-ci.com/Bubba/haskell-lsp-test)
 This is the functional testing framework for [haskell-ide-engine](https://github.com/haskell/haskell-ide-engine), and potentially any other Language Server Protocol server.
+
+```haskell
+runSession "session/root/dir" $ do
+  doc <- openDoc "foo.hs" "haskell"
+  
+  skipMany notification
+  
+  sendRequest (Proxy :: Proxy DocumentSymbolRequest)
+              TextDocumentDocumentSymbol
+              (DocumentSymbolParams doc)
+              
+  RspDocumentSymbols rspSymbols <- response
+  let (List symbols) = fromJust (rspSymbols ^. result)