Merge pull request #85 from wz1000/master
authorLuke Lau <luke_lau@icloud.com>
Wed, 3 Feb 2021 17:53:59 +0000 (17:53 +0000)
committerGitHub <noreply@github.com>
Wed, 3 Feb 2021 17:53:59 +0000 (17:53 +0000)
use Text instead of String

.github/workflows/haskell.yml
cabal.project
test/dummy-server/Main.hs

index 2fb86aa0d3bce37b3aac1f3e4395dd017edf21c3..eac181be8e2c58912c1307759e18c00c1a9534ce 100644 (file)
@@ -1,4 +1,4 @@
-name: Haskell CI
+name: Test
 
 on: [push, pull_request]
 jobs:
@@ -9,7 +9,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        ghc: ['8.10.1', '8.8.3', '8.6.5', '8.4.4']
+        ghc: ['8.10.3', '8.8.3', '8.6.5', '8.4.4']
         os: [ubuntu-latest, macOS-latest, windows-latest]
         exclude:
           - os: windows-latest
@@ -17,7 +17,7 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2
-    - uses: actions/setup-haskell@v1.1.4
+    - uses: haskell/actions/setup@v1
       with:
         ghc-version: ${{ matrix.ghc }}
         cabal-version: '3.2'
index add6b6567510e9aaea8b66757848be689e938fa8..cc9722a6f7decb7a89a1d628fea6d84e0cd7936f 100644 (file)
@@ -6,11 +6,11 @@ haddock-quickjump: True
 
 source-repository-package
     type: git
-    location: https://github.com/banacorn/lsp.git
-    tag: 0556d22fc66f24bb526f671666183a86b485837e
+    location: https://github.com/alanz/lsp.git
+    tag: 96aad3d7cc64fe9e4e29c6bccb19a3ad5ff8926d
     subdir: lsp-types
 
 source-repository-package
     type: git
-    location: https://github.com/banacorn/lsp.git
-    tag: 0556d22fc66f24bb526f671666183a86b485837e
\ No newline at end of file
+    location: https://github.com/alanz/lsp.git
+    tag: 96aad3d7cc64fe9e4e29c6bccb19a3ad5ff8926d
index 7c73e3b019ecb676583410b1efd1e78a153d1ccb..aee3449c11b5f4e578777d2a8ae3f497fa4414fd 100644 (file)
@@ -37,14 +37,14 @@ handlers =
     [ notificationHandler SInitialized $
         \_noti ->
           sendNotification SWindowLogMessage $
-            LogMessageParams MtLog "initialized",
-      requestHandler STextDocumentHover $
+            LogMessageParams MtLog "initialized"
+    , requestHandler STextDocumentHover $
         \_req responder ->
           responder $
             Right $
               Just $
-                Hover (HoverContents (MarkupContent MkPlainText "hello")) Nothing,
-      requestHandler STextDocumentDocumentSymbol $
+                Hover (HoverContents (MarkupContent MkPlainText "hello")) Nothing
+    , requestHandler STextDocumentDocumentSymbol $
         \_req responder ->
           responder $
             Right $
@@ -58,8 +58,8 @@ handlers =
                       (mkRange 0 0 3 6)
                       (mkRange 0 0 3 6)
                       Nothing
-                  ],
-      notificationHandler STextDocumentDidOpen $
+                  ]
+     , notificationHandler STextDocumentDidOpen $
         \noti -> do
           let NotificationMessage _ _ (DidOpenTextDocumentParams doc) = noti
               TextDocumentItem uri _ _ _ = doc
@@ -123,8 +123,8 @@ handlers =
               when (".unregister.abs" `isSuffixOf` fp) $
                 do
                   Just token <- runInIO $ asks absRegToken >>= tryReadMVar
-                  runInIO $ unregisterCapability token,
-      requestHandler SWorkspaceExecuteCommand $ \req resp -> do
+                  runInIO $ unregisterCapability token
+     , requestHandler SWorkspaceExecuteCommand $ \req resp -> do
         let RequestMessage _ _ _ (ExecuteCommandParams Nothing "doAnEdit" (Just (List [val]))) = req
             Success docUri = fromJSON val
             edit = List [TextEdit (mkRange 0 0 0 5) "howdy"]
@@ -132,8 +132,8 @@ handlers =
               ApplyWorkspaceEditParams (Just "Howdy edit") $
                 WorkspaceEdit (Just (HM.singleton docUri edit)) Nothing
         resp $ Right Null
-        void $ sendRequest SWorkspaceApplyEdit params (const (pure ())),
-      requestHandler STextDocumentCodeAction $ \req resp -> do
+        void $ sendRequest SWorkspaceApplyEdit params (const (pure ()))
+     , requestHandler STextDocumentCodeAction $ \req resp -> do
         let RequestMessage _ _ _ params = req
             CodeActionParams _ _ _ _ cactx = params
             CodeActionContext diags _ = cactx
@@ -145,9 +145,10 @@ handlers =
                 (Just (List [d]))
                 Nothing
                 Nothing
+                Nothing
                 (Just (Command "" "deleteThis" Nothing))
-        resp $ Right $ InR <$> codeActions,
-      requestHandler STextDocumentCompletion $ \_req resp -> do
+        resp $ Right $ InR <$> codeActions
+     , requestHandler STextDocumentCompletion $ \_req resp -> do
         let res = CompletionList True (List [item])
             item =
               CompletionItem