Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
josephsumabat committed Nov 7, 2024
1 parent 2fea370 commit be5f12a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 98 deletions.
7 changes: 3 additions & 4 deletions src/StaticLS/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import Data.Text qualified as T
import Language.LSP.Logging qualified as LSP.Logging
import Language.LSP.Protocol.Message (
Method (..),
ResponseError (..),
TMessage,
)
import Language.LSP.Protocol.Message qualified as LSP
Expand Down Expand Up @@ -116,7 +115,7 @@ initServer ::
LoggerM IO ->
LanguageContextEnv LspConfig ->
TMessage 'Method_Initialize ->
IO (Either ResponseError (LanguageContextEnv LspConfig))
IO (Either (LSP.TResponseError Method_Initialize) (LanguageContextEnv LspConfig))
initServer reactorChan staticEnvOptions logger serverConfig _ = do
runExceptT $ do
wsRoot <- ExceptT $ LSP.runLspT serverConfig getWsRoot
Expand All @@ -129,11 +128,11 @@ initServer reactorChan staticEnvOptions logger serverConfig _ = do
Conc.writeChan reactorChan $ ReactorMsgLspAct Handlers.handleGhcidFileChange
pure serverConfig
where
getWsRoot :: LSP.LspM config (Either ResponseError FilePath)
getWsRoot :: LSP.LspM config (Either (LSP.TResponseError Method_Initialize) FilePath)
getWsRoot = do
mRootPath <- LSP.getRootPath
pure $ case mRootPath of
Nothing -> Left $ ResponseError (InR ErrorCodes_InvalidRequest) "No root workspace was found" Nothing
Nothing -> Left $ LSP.TResponseError (InR ErrorCodes_InvalidRequest) "No root workspace was found" Nothing
Just p -> Right p
#else
initServer ::
Expand Down
124 changes: 30 additions & 94 deletions static-ls.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.0

-- This file has been generated from package.yaml by hpack version 0.35.2.
-- This file has been generated from package.yaml by hpack version 0.37.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -33,70 +33,6 @@ flag dev
default: False

library
hs-source-dirs:
src
default-extensions:
LambdaCase
ExplicitNamespaces
OverloadedRecordDot
OverloadedStrings
NoFieldSelectors
DuplicateRecordFields
DataKinds
PatternSynonyms
BlockArguments
ViewPatterns
ghc-options: -Wall -Wno-name-shadowing -Wincomplete-record-updates -fwrite-ide-info -hiedir test/TestData/.hiefiles -haddock
build-depends:
Diff
, aeson >=2 && <2.3
, array >=0.5.4 && <0.6
, async
, base >=4.17.0 && <4.21
, bytestring >=0.10 && <0.13
, co-log-core ==0.3.*
, containers >=0.6.0 && <0.8
, cryptohash-md5
, directory >=1.3.7 && <1.4
, errors >=2.3.0 && <2.4
, exceptions
, extra >=1.7.12 && <1.8
, filepath
, fsnotify
, ghc >=9.4.3 && <9.11
, ghc-paths >=0.1.0 && <0.2
, hashable
, haskell-ast
, haskell-lexer >=1.1.1 && <1.2.0
, hiedb ==0.6.*
, lens
, lsp >=2.4.0.0 && <2.7.0.0
, lsp-types >=2.1.0.0 && <2.4.0.0
, mtl >=2.2.2 && <2.4
, neat-interpolation
, optics
, parsec >=3.1.0 && <3.2
, pretty-simple
, raw-strings-qq
, regex-tdfa
, row-types
, sqlite-simple >=0.4.18 && <0.5
, stm
, template-haskell >=2.19.0 && <2.23
, text >=2.0.1 && <2.2
, text-range
, text-rope ==0.2
, transformers >=0.5.6.2 && <0.7
, tree-sitter-ast
, tree-sitter-haskell
, tree-sitter-simple
, typed-process
, unliftio >=0.2.1 && <0.3
, unliftio-core >=0.2.1 && <0.3
, unordered-containers ==0.2.*
default-language: GHC2021
if flag(dev)
ghc-options: -fwrite-ide-info -hiedir .hiefiles -hidir .hifiles -fdefer-type-errors -fno-defer-typed-holes -Werror=deferred-type-errors -Werror=deferred-out-of-scope-variables
exposed-modules:
Data.Change
Data.ConcurrentCache
Expand Down Expand Up @@ -134,8 +70,8 @@ library
StaticLS.IDE.CodeActions.AddTypeSig
StaticLS.IDE.CodeActions.AutoExport
StaticLS.IDE.CodeActions.AutoImport
StaticLS.IDE.CodeActions.Types
StaticLS.IDE.CodeActions.RemoveRedundantImports
StaticLS.IDE.CodeActions.Types
StaticLS.IDE.Completion
StaticLS.IDE.Definition
StaticLS.IDE.Diagnostics
Expand All @@ -147,14 +83,14 @@ library
StaticLS.IDE.Hover
StaticLS.IDE.Hover.Info
StaticLS.IDE.Implementation
StaticLS.IDE.InlayHints
StaticLS.IDE.Monad
StaticLS.IDE.References
StaticLS.IDE.Rename
StaticLS.IDE.SourceEdit
StaticLS.IDE.SymbolKind
StaticLS.IDE.Utils
StaticLS.IDE.Workspace.Symbol
StaticLS.IDE.InlayHints
StaticLS.Logger
StaticLS.Maybe
StaticLS.Monad
Expand Down Expand Up @@ -192,18 +128,18 @@ library
, aeson >=2 && <2.3
, array >=0.5.4 && <0.6
, async
, base >=4.17.0 && <4.19
, base >=4.17.0 && <4.21
, bytestring >=0.10 && <0.13
, co-log-core ==0.3.*
, containers >=0.6.0 && <0.7
, containers >=0.6.0 && <0.8
, cryptohash-md5
, directory >=1.3.7 && <1.4
, errors >=2.3.0 && <2.4
, exceptions
, extra >=1.7.12 && <1.8
, filepath
, fsnotify
, ghc >=9.4.3 && <9.7
, ghc >=9.4.3 && <9.11
, ghc-paths >=0.1.0 && <0.2
, hashable
, haskell-ast
Expand All @@ -222,8 +158,8 @@ library
, row-types
, sqlite-simple >=0.4.18 && <0.5
, stm
, template-haskell >=2.19.0 && <2.21
, text >=2.0.1 && <2.1
, template-haskell >=2.19.0 && <2.23
, text >=2.0.1 && <2.2
, text-range
, text-rope ==0.2
, transformers >=0.5.6.2 && <0.7
Expand Down Expand Up @@ -263,18 +199,18 @@ executable print-hie
, aeson >=2 && <2.3
, array >=0.5.4 && <0.6
, async
, base >=4.17.0 && <4.19
, base >=4.17.0 && <4.21
, bytestring >=0.10 && <0.13
, co-log-core ==0.3.*
, containers >=0.6.0 && <0.7
, containers >=0.6.0 && <0.8
, cryptohash-md5
, directory >=1.3.7 && <1.4
, errors >=2.3.0 && <2.4
, exceptions
, extra >=1.7.12 && <1.8
, filepath
, fsnotify
, ghc >=9.4.3 && <9.7
, ghc >=9.4.3 && <9.11
, ghc-paths >=0.1.0 && <0.2
, hashable
, haskell-ast
Expand All @@ -295,8 +231,8 @@ executable print-hie
, sqlite-simple >=0.4.18 && <0.5
, static-ls
, stm
, template-haskell >=2.19.0 && <2.21
, text >=2.0.1 && <2.1
, template-haskell >=2.19.0 && <2.23
, text >=2.0.1 && <2.2
, text-range
, text-rope ==0.2
, transformers >=0.5.6.2 && <0.7
Expand Down Expand Up @@ -337,18 +273,18 @@ executable static-ls
, aeson >=2 && <2.3
, array >=0.5.4 && <0.6
, async
, base >=4.17.0 && <4.19
, base >=4.17.0 && <4.21
, bytestring >=0.10 && <0.13
, co-log-core ==0.3.*
, containers >=0.6.0 && <0.7
, containers >=0.6.0 && <0.8
, cryptohash-md5
, directory >=1.3.7 && <1.4
, errors >=2.3.0 && <2.4
, exceptions
, extra >=1.7.12 && <1.8
, filepath
, fsnotify
, ghc >=9.4.3 && <9.7
, ghc >=9.4.3 && <9.11
, ghc-paths >=0.1.0 && <0.2
, hashable
, haskell-ast
Expand All @@ -369,8 +305,8 @@ executable static-ls
, sqlite-simple >=0.4.18 && <0.5
, static-ls
, stm
, template-haskell >=2.19.0 && <2.21
, text >=2.0.1 && <2.1
, template-haskell >=2.19.0 && <2.23
, text >=2.0.1 && <2.2
, text-range
, text-rope ==0.2
, transformers >=0.5.6.2 && <0.7
Expand Down Expand Up @@ -413,18 +349,18 @@ test-suite expect_tests
, aeson >=2 && <2.3
, array >=0.5.4 && <0.6
, async
, base >=4.17.0 && <4.19
, base >=4.17.0 && <4.21
, bytestring >=0.10 && <0.13
, co-log-core ==0.3.*
, containers >=0.6.0 && <0.7
, containers >=0.6.0 && <0.8
, cryptohash-md5
, directory >=1.3.7 && <1.4
, errors >=2.3.0 && <2.4
, exceptions
, extra >=1.7.12 && <1.8
, filepath
, fsnotify
, ghc >=9.4.3 && <9.7
, ghc >=9.4.3 && <9.11
, ghc-paths >=0.1.0 && <0.2
, hashable
, haskell-ast
Expand All @@ -448,8 +384,8 @@ test-suite expect_tests
, stm
, tasty
, tasty-expect
, template-haskell >=2.19.0 && <2.21
, text >=2.0.1 && <2.1
, template-haskell >=2.19.0 && <2.23
, text >=2.0.1 && <2.2
, text-range
, text-rope ==0.2
, transformers >=0.5.6.2 && <0.7
Expand Down Expand Up @@ -520,27 +456,27 @@ test-suite static-ls-test
, aeson >=2 && <2.3
, array >=0.5.4 && <0.6
, async
, base >=4.17.0 && <4.19
, base >=4.17.0 && <4.21
, bytestring >=0.10 && <0.13
, co-log-core ==0.3.*
, containers >=0.6.0 && <0.7
, containers >=0.6.0 && <0.8
, cryptohash-md5
, directory >=1.3.7 && <1.4
, errors >=2.3.0 && <2.4
, exceptions
, extra >=1.7.12 && <1.8
, filepath
, fsnotify
, ghc >=9.4.3 && <9.7
, ghc >=9.4.3 && <9.11
, ghc-paths >=0.1.0 && <0.2
, hashable
, haskell-ast
, haskell-lexer >=1.1.1 && <1.2.0
, hiedb ==0.6.*
, hspec ==2.*
, lens
, lsp ==2.4.0.0
, lsp-types ==2.1.0.0
, lsp >=2.4.0.0 && <2.8.0.0
, lsp-types >=2.1.0.0 && <2.4.0.0
, mtl >=2.2.2 && <2.4
, neat-interpolation
, optics
Expand All @@ -553,8 +489,8 @@ test-suite static-ls-test
, sqlite-simple >=0.4.18 && <0.5
, static-ls
, stm
, template-haskell >=2.19.0 && <2.21
, text >=2.0.1 && <2.1
, template-haskell >=2.19.0 && <2.23
, text >=2.0.1 && <2.2
, text-range
, text-rope ==0.2
, transformers >=0.5.6.2 && <0.7
Expand Down

0 comments on commit be5f12a

Please sign in to comment.