Bump up the number of jobs when building hie in travis
authorLuke Lau <luke_lau@icloud.com>
Fri, 8 Jun 2018 19:43:48 +0000 (15:43 -0400)
committerLuke Lau <luke_lau@icloud.com>
Fri, 8 Jun 2018 19:43:48 +0000 (15:43 -0400)
.travis.yml
test/Test.hs

index 22b64e9a342fcbd62e9276021e032f5f0652dcfd..b246a470090b9feb2523c06150cd601fdd78805d 100644 (file)
@@ -17,7 +17,7 @@ install:
   - git clone https://github.com/haskell/haskell-ide-engine.git --recursive
   - cd haskell-ide-engine
   - git checkout c34c08eeced8173983601e98304258075f3057e1
-  - stack --no-terminal --skip-ghc-check install -j1
+  - stack --no-terminal --skip-ghc-check install -j2
   - stack exec hoogle generate
   - cd ..
 
index 401fd9815fd09e81db4f3af8dafeff13ebc2f2ad..13e7ccc5d3066b687c7ca4391a3e6e8af62cbe77 100644 (file)
@@ -1,6 +1,7 @@
 {-# LANGUAGE DuplicateRecordFields #-}
 {-# LANGUAGE OverloadedStrings #-}
 import           Test.Hspec
+import           Data.Maybe
 import           Data.Proxy
 import           Control.Monad.IO.Class
 import           Control.Lens hiding (List)
@@ -20,18 +21,19 @@ main = hspec $ do
 
         skipMany loggingNotification
 
-        (NotPublishDiagnostics (NotificationMessage _ TextDocumentPublishDiagnostics (PublishDiagnosticsParams _ (List diags)))) <- notification
+        NotPublishDiagnostics diagsNot <- notification
 
-        liftIO $ diags `shouldBe` []
+        liftIO $ diagsNot ^. params . diagnostics `shouldBe` List []
         
         sendRequest (Proxy :: Proxy DocumentSymbolRequest)
                     TextDocumentDocumentSymbol
                     (DocumentSymbolParams docId)
 
-        (RspDocumentSymbols (ResponseMessage _ _ (Just (List symbols)) Nothing)) <- response
+        RspDocumentSymbols rspSymbols <- response
         
         liftIO $ do
-          let mainSymbol = head symbols
+          let (List symbols) = fromJust (rspSymbols ^. result)
+              mainSymbol = head symbols
           mainSymbol ^. name `shouldBe` "main"
           mainSymbol ^. kind `shouldBe` SkFunction
           mainSymbol ^. location . range `shouldBe` Range (Position 3 0) (Position 3 4)