haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.71k stars 368 forks source link

HLS crashes on Ubuntu for no obvious reason #2242

Closed re-xyr closed 3 years ago

re-xyr commented 3 years ago

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30)
Tool versions found on the $PATH
cabal:          3.4.0.0
stack:          2.7.3
ghc:            8.10.7

Which OS do you use: Ubuntu 20.04 Which lsp-client do you use: Visual Studio Code Describe your project (alternative: link to the project): https://github.com/re-xyr/aqn Contents of hie.yaml:

cradle:
  stack:

Steps to reproduce

Expected behaviour

Actual behaviour

Include debug information

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

Debug output: ``` haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30) ghcide setup tester in /home/t532/code/aqn. Report bugs at https://github.com/haskell/haskell-language-server/issues Step 1/4: Finding files to test in /home/t532/code/aqn Found 16 files Step 2/4: Looking for hie.yaml files that control setup Found 1 cradle (/home/t532/code/aqn/hie.yaml) Step 3/4: Initializing the IDE 2021-09-26 00:14:34.437027697 [ThreadId 7] DEBUG hls: Initializing exports map from hiedb Step 4/4: Type checking the files 2021-09-26 00:14:34.447683826 [ThreadId 7] DEBUG hls: Done initializing exports map from hiedb (315) 2021-09-26 00:14:34.451856428 [ThreadId 21] INFO hls: Consulting the cradle for "src/Aqn/Syntax.hs" Output from setting up the cradle Cradle {cradleRootDir = "/home/t532/code/aqn", cradleOptsProg = CradleAction: Stack} 2021-09-26 00:14:34.802236972 [ThreadId 25] INFO hie-bios: Using main module: 1. Package `aqn' component aqn:exe:aqn-exe with main-is file: /home/t532/code/aqn/app/Main.hs 2021-09-26 00:14:34.909690112 [ThreadId 25] INFO hie-bios: aqn> initial-build-steps (lib + exe) 2021-09-26 00:14:35.061030162 [ThreadId 25] INFO hie-bios: The following GHC options are incompatible with GHCi and have not been passed to it: -threaded 2021-09-26 00:14:35.061285767 [ThreadId 25] INFO hie-bios: Configuring GHCi with the following packages: aqn 2021-09-26 00:14:35.061369316 [ThreadId 25] INFO hie-bios: 2021-09-26 00:14:35.061423822 [ThreadId 25] INFO hie-bios: * * * * * * * * 2021-09-26 00:14:35.061471255 [ThreadId 25] INFO hie-bios: 2021-09-26 00:14:35.061511881 [ThreadId 25] INFO hie-bios: Warning: Multiple files use the same module name: 2021-09-26 00:14:35.061558831 [ThreadId 25] INFO hie-bios: * Paths_aqn found at the following paths 2021-09-26 00:14:35.061603825 [ThreadId 25] INFO hie-bios: * /home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen/Paths_aqn.hs (aqn:exe:aqn-exe) 2021-09-26 00:14:35.061654381 [ThreadId 25] INFO hie-bios: * /home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen/Paths_aqn.hs (aqn:lib) 2021-09-26 00:14:35.061706095 [ThreadId 25] INFO hie-bios: * * * * * * * * 2021-09-26 00:14:35.061746044 [ThreadId 25] INFO hie-bios: 2021-09-26 00:14:35.517266585 [ThreadId 32] INFO hie-bios: /home/t532/code/aqn/.stack-work/install/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb:/home/t532/.stack/snapshots/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb:/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d 2021-09-26 00:14:36.004635764 [ThreadId 21] DEBUG hls: Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/home/t532/code/aqn/.stack-work/odir","-hidir=/home/t532/code/aqn/.stack-work/odir","-hide-all-packages","-XTypeOperators","-XDataKinds","-XFlexibleContexts","-XGADTs","-XStrict","-XLambdaCase","-XTemplateHaskell","-XBlockArguments","-XOverloadedStrings","-XTypeSynonymInstances","-XFlexibleInstances","-XConstraintKinds","-XRankNTypes","-XTypeApplications","-XApplicativeDo","-XMultiParamTypeClasses","-XFunctionalDependencies","-XTupleSections","-XDeriveTraversable","-XScopedTypeVariables","-XKindSignatures","-XUndecidableInstances","-XOverloadedLists","-XTypeFamilies","-XPostfixOperators","-XDeriveGeneric","-XDeriveAnyClass","-XStandaloneDeriving","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build","-i/home/t532/code/aqn/src","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/global-autogen","-stubdir=/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build","-package-id=base-4.14.3.0","-package-id=containers-0.6.5.1","-package-id=deepseq-1.4.4.0","-package-id=extra-1.7.9-H13SV8oiNFv6jqPPHm2cAt","-package-id=freer-simple-1.2.1.1-4ODU6RlpJhN2ckoHfZS4dA","-package-id=lens-4.19.2-A1mew4pcCxKGiE9GSxxcOW","-package-id=megaparsec-9.0.1-9KCu2O1rRQeFkFtjX2YkDY","-package-id=parser-combinators-1.2.1-IbT4qyHauK0Ahn9nXuH97m","-package-id=prettyprinter-1.7.0-HWCyOjdORQF6Qy2nbZsKCL","-package-id=reflection-2.1.6-KXta4tOu4EpKOtzHOC6CXA","-package-id=strict-0.4.0.1-GuglY07PLRZJIRegduuVTt","-package-id=text-1.2.4.1","-package-id=time-1.9.3","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe","-i/home/t532/code/aqn/app","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/aqn-exe-tmp","-Wall","-Wincomplete-uni-patterns","-Wpartial-fields","-Wincomplete-record-updates","-Widentities","-Wredundant-constraints","-fprof-auto-exported","-Wall","-Wincomplete-uni-patterns","-Wpartial-fields","-Wincomplete-record-updates","-Widentities","-Wredundant-constraints","-fprof-auto-top","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/t532/code/aqn/.stack-work/ghci/273ce2ec/cabal_macros.h","-ghci-script=/tmp/haskell-stack-ghci/a6ab8907/ghci-script","-package-db","/home/t532/code/aqn/.stack-work/install/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb","-package-db","/home/t532/.stack/snapshots/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb","-package-db","/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d"], componentRoot = "/home/t532/code/aqn", componentDependencies = ["aqn.cabal","package.yaml","stack.yaml"]},"/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7") 2021-09-26 00:14:36.061319352 [ThreadId 21] INFO hls: Using interface files cache dir: /home/t532/.cache/ghcide/main-8ff497c617fa6476e193516735fd434689e83d6b 2021-09-26 00:14:36.061585524 [ThreadId 21] INFO hls: Making new HscEnv[main] 2021-09-26 00:14:36.069768159 [ThreadId 21] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 5),fromList [("/home/t532/code/aqn/hie.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("aqn.cabal",Just 2021-09-25 15:30:43.222203741 UTC),("package.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("stack.yaml",Just 2021-09-25 15:30:34.314327896 UTC)]) 2021-09-26 00:14:36.119741659 [ThreadId 21] DEBUG hls: Known files updated: fromList [(TargetModule Aqn.Check,fromList ["/home/t532/code/aqn/src/Aqn/Check.hs"]),(TargetModule Data.Tsil,fromList ["/home/t532/code/aqn/src/Data/Tsil.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/app/Main.hs",fromList ["/home/t532/code/aqn/app/Main.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Syntax.hs",fromList ["/home/t532/code/aqn/src/Aqn/Syntax.hs"]),(TargetModule Aqn.Parse,fromList ["/home/t532/code/aqn/src/Aqn/Parse.hs"]),(TargetModule Aqn.CheckTop,fromList ["/home/t532/code/aqn/src/Aqn/CheckTop.hs"]),(TargetModule Aqn.Common,fromList ["/home/t532/code/aqn/src/Aqn/Common.hs"]),(TargetModule Aqn.Eval,fromList ["/home/t532/code/aqn/src/Aqn/Eval.hs"]),(TargetModule Aqn.Value,fromList ["/home/t532/code/aqn/src/Aqn/Value.hs"]),(TargetModule Aqn.Global,fromList ["/home/t532/code/aqn/src/Aqn/Global.hs"]),(TargetModule Aqn.Presyntax,fromList ["/home/t532/code/aqn/src/Aqn/Presyntax.hs"]),(TargetModule Aqn.Syntax,fromList ["/home/t532/code/aqn/src/Aqn/Syntax.hs"]),(TargetModule Aqn.Pretty,fromList ["/home/t532/code/aqn/src/Aqn/Pretty.hs"]),(TargetModule Paths_aqn,fromList ["/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen/Paths_aqn.hs","/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen/Paths_aqn.hs"]),(TargetModule Aqn.Unify,fromList ["/home/t532/code/aqn/src/Aqn/Unify.hs"]),(TargetModule Aqn.Ref,fromList ["/home/t532/code/aqn/src/Aqn/Ref.hs"])] 2021-09-26 00:14:36.120263062 [ThreadId 14] DEBUG hls: Finishing build session(exception: AsyncCancelled) 2021-09-26 00:14:36.120366791 [ThreadId 21] DEBUG hls: Restarting build session for keys [GhcSessionIO; ] (aborting the previous one took 0.00s) 2021-09-26 00:14:36.123624731 [ThreadId 53] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/Setup.hs" 2021-09-26 00:14:36.123606951 [ThreadId 51] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Check.hs" 2021-09-26 00:14:36.124068911 [ThreadId 53] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Syntax.hs" 2021-09-26 00:14:36.124075637 [ThreadId 51] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Global.hs" 2021-09-26 00:14:36.12468346 [ThreadId 53] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Eval.hs" 2021-09-26 00:14:36.124796065 [ThreadId 51] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Pretty.hs" 2021-09-26 00:14:36.125421333 [ThreadId 53] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Value.hs" 2021-09-26 00:14:36.125536811 [ThreadId 52] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Unify.hs" 2021-09-26 00:14:36.125646454 [ThreadId 53] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/test/Spec.hs" 2021-09-26 00:14:36.125909083 [ThreadId 71] INFO hls: Consulting the cradle for "test/Spec.hs" Output from setting up the cradle Cradle {cradleRootDir = "/home/t532/code/aqn", cradleOptsProg = CradleAction: Stack} 2021-09-26 00:14:36.126692052 [ThreadId 53] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Data/Tsil.hs" 2021-09-26 00:14:36.477972237 [ThreadId 77] INFO hie-bios: Using main module: 1. Package `aqn' component aqn:exe:aqn-exe with main-is file: /home/t532/code/aqn/app/Main.hs 2021-09-26 00:14:36.583537978 [ThreadId 77] INFO hie-bios: aqn> initial-build-steps (lib + exe) 2021-09-26 00:14:36.727363427 [ThreadId 77] INFO hie-bios: The following GHC options are incompatible with GHCi and have not been passed to it: -threaded 2021-09-26 00:14:36.727514384 [ThreadId 77] INFO hie-bios: Configuring GHCi with the following packages: aqn 2021-09-26 00:14:36.727567842 [ThreadId 77] INFO hie-bios: 2021-09-26 00:14:36.7276059 [ThreadId 77] INFO hie-bios: * * * * * * * * 2021-09-26 00:14:36.727651609 [ThreadId 77] INFO hie-bios: 2021-09-26 00:14:36.727687626 [ThreadId 77] INFO hie-bios: Warning: Multiple files use the same module name: 2021-09-26 00:14:36.727725814 [ThreadId 77] INFO hie-bios: * Paths_aqn found at the following paths 2021-09-26 00:14:36.727763197 [ThreadId 77] INFO hie-bios: * /home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen/Paths_aqn.hs (aqn:exe:aqn-exe) 2021-09-26 00:14:36.72780554 [ThreadId 77] INFO hie-bios: * /home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen/Paths_aqn.hs (aqn:lib) 2021-09-26 00:14:36.727857543 [ThreadId 77] INFO hie-bios: * * * * * * * * 2021-09-26 00:14:36.727894933 [ThreadId 77] INFO hie-bios: 2021-09-26 00:14:37.187410977 [ThreadId 84] INFO hie-bios: /home/t532/code/aqn/.stack-work/install/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb:/home/t532/.stack/snapshots/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb:/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d 2021-09-26 00:14:37.669463366 [ThreadId 71] DEBUG hls: Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/home/t532/code/aqn/.stack-work/odir","-hidir=/home/t532/code/aqn/.stack-work/odir","-hide-all-packages","-XTypeOperators","-XDataKinds","-XFlexibleContexts","-XGADTs","-XStrict","-XLambdaCase","-XTemplateHaskell","-XBlockArguments","-XOverloadedStrings","-XTypeSynonymInstances","-XFlexibleInstances","-XConstraintKinds","-XRankNTypes","-XTypeApplications","-XApplicativeDo","-XMultiParamTypeClasses","-XFunctionalDependencies","-XTupleSections","-XDeriveTraversable","-XScopedTypeVariables","-XKindSignatures","-XUndecidableInstances","-XOverloadedLists","-XTypeFamilies","-XPostfixOperators","-XDeriveGeneric","-XDeriveAnyClass","-XStandaloneDeriving","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build","-i/home/t532/code/aqn/src","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/global-autogen","-stubdir=/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build","-package-id=base-4.14.3.0","-package-id=containers-0.6.5.1","-package-id=deepseq-1.4.4.0","-package-id=extra-1.7.9-H13SV8oiNFv6jqPPHm2cAt","-package-id=freer-simple-1.2.1.1-4ODU6RlpJhN2ckoHfZS4dA","-package-id=lens-4.19.2-A1mew4pcCxKGiE9GSxxcOW","-package-id=megaparsec-9.0.1-9KCu2O1rRQeFkFtjX2YkDY","-package-id=parser-combinators-1.2.1-IbT4qyHauK0Ahn9nXuH97m","-package-id=prettyprinter-1.7.0-HWCyOjdORQF6Qy2nbZsKCL","-package-id=reflection-2.1.6-KXta4tOu4EpKOtzHOC6CXA","-package-id=strict-0.4.0.1-GuglY07PLRZJIRegduuVTt","-package-id=text-1.2.4.1","-package-id=time-1.9.3","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe","-i/home/t532/code/aqn/app","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/aqn-exe-tmp","-Wall","-Wincomplete-uni-patterns","-Wpartial-fields","-Wincomplete-record-updates","-Widentities","-Wredundant-constraints","-fprof-auto-exported","-Wall","-Wincomplete-uni-patterns","-Wpartial-fields","-Wincomplete-record-updates","-Widentities","-Wredundant-constraints","-fprof-auto-top","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/t532/code/aqn/.stack-work/ghci/273ce2ec/cabal_macros.h","-ghci-script=/tmp/haskell-stack-ghci/a6ab8907/ghci-script","-package-db","/home/t532/code/aqn/.stack-work/install/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb","-package-db","/home/t532/.stack/snapshots/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb","-package-db","/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d"], componentRoot = "/home/t532/code/aqn", componentDependencies = ["aqn.cabal","package.yaml","stack.yaml"]},"/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7") 2021-09-26 00:14:37.723971806 [ThreadId 71] INFO hls: Using interface files cache dir: /home/t532/.cache/ghcide/main-8ff497c617fa6476e193516735fd434689e83d6b 2021-09-26 00:14:37.724224029 [ThreadId 71] INFO hls: Using interface files cache dir: /home/t532/.cache/ghcide/main-8ff497c617fa6476e193516735fd434689e83d6b 2021-09-26 00:14:37.724355969 [ThreadId 71] INFO hls: Making new HscEnv[main,main] 2021-09-26 00:14:37.731612705 [ThreadId 71] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 7),fromList [("/home/t532/code/aqn/hie.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("aqn.cabal",Just 2021-09-25 15:30:43.222203741 UTC),("package.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("stack.yaml",Just 2021-09-25 15:30:34.314327896 UTC)]) 2021-09-26 00:14:37.754562719 [ThreadId 71] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 8),fromList [("/home/t532/code/aqn/hie.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("aqn.cabal",Just 2021-09-25 15:30:43.222203741 UTC),("package.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("stack.yaml",Just 2021-09-25 15:30:34.314327896 UTC)]) 2021-09-26 00:14:37.834369521 [ThreadId 71] DEBUG hls: Known files updated: fromList [(TargetModule Aqn.Check,fromList ["/home/t532/code/aqn/src/Aqn/Check.hs"]),(TargetModule Data.Tsil,fromList ["/home/t532/code/aqn/src/Data/Tsil.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/test/Spec.hs",fromList ["/home/t532/code/aqn/test/Spec.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/app/Main.hs",fromList ["/home/t532/code/aqn/app/Main.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Syntax.hs",fromList ["/home/t532/code/aqn/src/Aqn/Syntax.hs"]),(TargetModule Aqn.Parse,fromList ["/home/t532/code/aqn/src/Aqn/Parse.hs"]),(TargetModule Aqn.CheckTop,fromList ["/home/t532/code/aqn/src/Aqn/CheckTop.hs"]),(TargetModule Aqn.Common,fromList ["/home/t532/code/aqn/src/Aqn/Common.hs"]),(TargetModule Aqn.Eval,fromList ["/home/t532/code/aqn/src/Aqn/Eval.hs"]),(TargetModule Aqn.Value,fromList ["/home/t532/code/aqn/src/Aqn/Value.hs"]),(TargetModule Aqn.Global,fromList ["/home/t532/code/aqn/src/Aqn/Global.hs"]),(TargetModule Aqn.Presyntax,fromList ["/home/t532/code/aqn/src/Aqn/Presyntax.hs"]),(TargetModule Aqn.Syntax,fromList ["/home/t532/code/aqn/src/Aqn/Syntax.hs"]),(TargetModule Aqn.Pretty,fromList ["/home/t532/code/aqn/src/Aqn/Pretty.hs"]),(TargetModule Paths_aqn,fromList ["/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen/Paths_aqn.hs","/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen/Paths_aqn.hs"]),(TargetModule Aqn.Unify,fromList ["/home/t532/code/aqn/src/Aqn/Unify.hs"]),(TargetModule Aqn.Ref,fromList ["/home/t532/code/aqn/src/Aqn/Ref.hs"])] 2021-09-26 00:14:37.834897651 [ThreadId 44] DEBUG hls: Finishing build session(exception: AsyncCancelled) 2021-09-26 00:14:37.835030481 [ThreadId 71] DEBUG hls: Restarting build session for keys [GhcSessionIO; ] (aborting the previous one took 0.00s) 2021-09-26 00:14:37.842679683 [ThreadId 124] INFO hls: Consulting the cradle for "Setup.hs" Output from setting up the cradle Cradle {cradleRootDir = "/home/t532/code/aqn", cradleOptsProg = CradleAction: Stack} 2021-09-26 00:14:38.188089947 [ThreadId 128] INFO hie-bios: Using main module: 1. Package `aqn' component aqn:exe:aqn-exe with main-is file: /home/t532/code/aqn/app/Main.hs 2021-09-26 00:14:38.293589883 [ThreadId 128] INFO hie-bios: aqn> initial-build-steps (lib + exe) 2021-09-26 00:14:38.434350508 [ThreadId 128] INFO hie-bios: The following GHC options are incompatible with GHCi and have not been passed to it: -threaded 2021-09-26 00:14:38.434465734 [ThreadId 128] INFO hie-bios: Configuring GHCi with the following packages: aqn 2021-09-26 00:14:38.434529995 [ThreadId 128] INFO hie-bios: 2021-09-26 00:14:38.434570902 [ThreadId 128] INFO hie-bios: * * * * * * * * 2021-09-26 00:14:38.434622059 [ThreadId 128] INFO hie-bios: 2021-09-26 00:14:38.434658588 [ThreadId 128] INFO hie-bios: Warning: Multiple files use the same module name: 2021-09-26 00:14:38.43470797 [ThreadId 128] INFO hie-bios: * Paths_aqn found at the following paths 2021-09-26 00:14:38.434768576 [ThreadId 128] INFO hie-bios: * /home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen/Paths_aqn.hs (aqn:exe:aqn-exe) 2021-09-26 00:14:38.434811829 [ThreadId 128] INFO hie-bios: * /home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen/Paths_aqn.hs (aqn:lib) 2021-09-26 00:14:38.434871877 [ThreadId 128] INFO hie-bios: * * * * * * * * 2021-09-26 00:14:38.434936322 [ThreadId 128] INFO hie-bios: 2021-09-26 00:14:38.887582451 [ThreadId 135] INFO hie-bios: /home/t532/code/aqn/.stack-work/install/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb:/home/t532/.stack/snapshots/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb:/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d 2021-09-26 00:14:39.383217872 [ThreadId 124] DEBUG hls: Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/home/t532/code/aqn/.stack-work/odir","-hidir=/home/t532/code/aqn/.stack-work/odir","-hide-all-packages","-XTypeOperators","-XDataKinds","-XFlexibleContexts","-XGADTs","-XStrict","-XLambdaCase","-XTemplateHaskell","-XBlockArguments","-XOverloadedStrings","-XTypeSynonymInstances","-XFlexibleInstances","-XConstraintKinds","-XRankNTypes","-XTypeApplications","-XApplicativeDo","-XMultiParamTypeClasses","-XFunctionalDependencies","-XTupleSections","-XDeriveTraversable","-XScopedTypeVariables","-XKindSignatures","-XUndecidableInstances","-XOverloadedLists","-XTypeFamilies","-XPostfixOperators","-XDeriveGeneric","-XDeriveAnyClass","-XStandaloneDeriving","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build","-i/home/t532/code/aqn/src","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/global-autogen","-stubdir=/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build","-package-id=base-4.14.3.0","-package-id=containers-0.6.5.1","-package-id=deepseq-1.4.4.0","-package-id=extra-1.7.9-H13SV8oiNFv6jqPPHm2cAt","-package-id=freer-simple-1.2.1.1-4ODU6RlpJhN2ckoHfZS4dA","-package-id=lens-4.19.2-A1mew4pcCxKGiE9GSxxcOW","-package-id=megaparsec-9.0.1-9KCu2O1rRQeFkFtjX2YkDY","-package-id=parser-combinators-1.2.1-IbT4qyHauK0Ahn9nXuH97m","-package-id=prettyprinter-1.7.0-HWCyOjdORQF6Qy2nbZsKCL","-package-id=reflection-2.1.6-KXta4tOu4EpKOtzHOC6CXA","-package-id=strict-0.4.0.1-GuglY07PLRZJIRegduuVTt","-package-id=text-1.2.4.1","-package-id=time-1.9.3","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe","-i/home/t532/code/aqn/app","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen","-i/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/aqn-exe-tmp","-Wall","-Wincomplete-uni-patterns","-Wpartial-fields","-Wincomplete-record-updates","-Widentities","-Wredundant-constraints","-fprof-auto-exported","-Wall","-Wincomplete-uni-patterns","-Wpartial-fields","-Wincomplete-record-updates","-Widentities","-Wredundant-constraints","-fprof-auto-top","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/t532/code/aqn/.stack-work/ghci/273ce2ec/cabal_macros.h","-ghci-script=/tmp/haskell-stack-ghci/a6ab8907/ghci-script","-package-db","/home/t532/code/aqn/.stack-work/install/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb","-package-db","/home/t532/.stack/snapshots/x86_64-linux/30d6cb3960b7dcb2cc2950fd1b89774c72f24e1cac1bb1f73d63bc8fa76bd4de/8.10.7/pkgdb","-package-db","/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d"], componentRoot = "/home/t532/code/aqn", componentDependencies = ["aqn.cabal","package.yaml","stack.yaml"]},"/home/t532/.ghcup/ghc/8.10.7/lib/ghc-8.10.7") 2021-09-26 00:14:39.438263614 [ThreadId 124] INFO hls: Using interface files cache dir: /home/t532/.cache/ghcide/main-8ff497c617fa6476e193516735fd434689e83d6b 2021-09-26 00:14:39.43852271 [ThreadId 124] INFO hls: Using interface files cache dir: /home/t532/.cache/ghcide/main-8ff497c617fa6476e193516735fd434689e83d6b 2021-09-26 00:14:39.43877679 [ThreadId 124] INFO hls: Using interface files cache dir: /home/t532/.cache/ghcide/main-8ff497c617fa6476e193516735fd434689e83d6b 2021-09-26 00:14:39.439050312 [ThreadId 124] INFO hls: Making new HscEnv[main,main,main] 2021-09-26 00:14:39.446793082 [ThreadId 124] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 10),fromList [("/home/t532/code/aqn/hie.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("aqn.cabal",Just 2021-09-25 15:30:43.222203741 UTC),("package.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("stack.yaml",Just 2021-09-25 15:30:34.314327896 UTC)]) 2021-09-26 00:14:39.469798853 [ThreadId 124] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 11),fromList [("/home/t532/code/aqn/hie.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("aqn.cabal",Just 2021-09-25 15:30:43.222203741 UTC),("package.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("stack.yaml",Just 2021-09-25 15:30:34.314327896 UTC)]) 2021-09-26 00:14:39.493466111 [ThreadId 124] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 12),fromList [("/home/t532/code/aqn/hie.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("aqn.cabal",Just 2021-09-25 15:30:43.222203741 UTC),("package.yaml",Just 2021-09-25 15:08:05.387783623 UTC),("stack.yaml",Just 2021-09-25 15:30:34.314327896 UTC)]) 2021-09-26 00:14:39.599778636 [ThreadId 124] DEBUG hls: Known files updated: fromList [(TargetModule Aqn.Check,fromList ["/home/t532/code/aqn/src/Aqn/Check.hs"]),(TargetModule Data.Tsil,fromList ["/home/t532/code/aqn/src/Data/Tsil.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/test/Spec.hs",fromList ["/home/t532/code/aqn/test/Spec.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/app/Main.hs",fromList ["/home/t532/code/aqn/app/Main.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Syntax.hs",fromList ["/home/t532/code/aqn/src/Aqn/Syntax.hs"]),(TargetModule Aqn.Parse,fromList ["/home/t532/code/aqn/src/Aqn/Parse.hs"]),(TargetModule Aqn.CheckTop,fromList ["/home/t532/code/aqn/src/Aqn/CheckTop.hs"]),(TargetModule Aqn.Common,fromList ["/home/t532/code/aqn/src/Aqn/Common.hs"]),(TargetModule Aqn.Eval,fromList ["/home/t532/code/aqn/src/Aqn/Eval.hs"]),(TargetModule Aqn.Value,fromList ["/home/t532/code/aqn/src/Aqn/Value.hs"]),(TargetModule Aqn.Global,fromList ["/home/t532/code/aqn/src/Aqn/Global.hs"]),(TargetModule Aqn.Presyntax,fromList ["/home/t532/code/aqn/src/Aqn/Presyntax.hs"]),(TargetModule Aqn.Syntax,fromList ["/home/t532/code/aqn/src/Aqn/Syntax.hs"]),(TargetModule Aqn.Pretty,fromList ["/home/t532/code/aqn/src/Aqn/Pretty.hs"]),(TargetModule Paths_aqn,fromList ["/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/aqn-exe/autogen/Paths_aqn.hs","/home/t532/code/aqn/.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/autogen/Paths_aqn.hs"]),(TargetModule Aqn.Unify,fromList ["/home/t532/code/aqn/src/Aqn/Unify.hs"]),(TargetFile NormalizedFilePath "/home/t532/code/aqn/Setup.hs",fromList ["/home/t532/code/aqn/Setup.hs"]),(TargetModule Aqn.Ref,fromList ["/home/t532/code/aqn/src/Aqn/Ref.hs"])] 2021-09-26 00:14:39.600246054 [ThreadId 124] DEBUG hls: Restarting build session for keys [GhcSessionIO; ] (aborting the previous one took 0.00s) 2021-09-26 00:14:39.600403263 [ThreadId 96] DEBUG hls: Finishing build session(exception: AsyncCancelled) 2021-09-26 00:14:39.60090095 [ThreadId 156] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Common.hs" 2021-09-26 00:14:39.600902932 [ThreadId 157] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Global.hs" 2021-09-26 00:14:39.600983386 [ThreadId 157] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/test/Spec.hs" 2021-09-26 00:14:39.601077439 [ThreadId 156] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Syntax.hs" 2021-09-26 00:14:39.60108569 [ThreadId 157] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Eval.hs" 2021-09-26 00:14:39.601176545 [ThreadId 156] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Pretty.hs" 2021-09-26 00:14:39.601185317 [ThreadId 157] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Ref.hs" 2021-09-26 00:14:39.601222477 [ThreadId 156] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/app/Main.hs" 2021-09-26 00:14:39.607629927 [ThreadId 155] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Value.hs" 2021-09-26 00:14:39.607720612 [ThreadId 157] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/Setup.hs" 2021-09-26 00:14:39.607915159 [ThreadId 157] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/CheckTop.hs" 2021-09-26 00:14:39.607980476 [ThreadId 157] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Presyntax.hs" 2021-09-26 00:14:39.607961935 [ThreadId 156] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Check.hs" 2021-09-26 00:14:39.608050837 [ThreadId 155] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Data/Tsil.hs" 2021-09-26 00:14:39.656032432 [ThreadId 155] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Parse.hs" 2021-09-26 00:14:39.666267097 [ThreadId 156] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/t532/code/aqn/src/Aqn/Unify.hs" 2021-09-26 00:14:39.672028451 [ThreadId 155] INFO hls: File: /home/t532/code/aqn/Setup.hs Hidden: no Range: 1:8-1:27 Source: not found Severity: DsError Message: Could not load module ‘Distribution.Simple’ It is a member of the hidden package ‘Cabal-3.2.1.0’. You can run ‘:set -package Cabal’ to expose it. (Note: this unloads all the modules in the current scope.) 2021-09-26 00:14:40.504498705 [ThreadId 155] INFO hls: File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 126:235-126:236 Source: hlint Severity: DsInfo Message: Redundant $ Found: ePi "z" z (XLoc t `eApp` XLoc x) $ (XLoc t `eApp` (XFun fsuc `eApp` XLoc x)) Why not: ePi "z" z (XLoc t `eApp` XLoc x) (XLoc t `eApp` (XFun fsuc `eApp` XLoc x)) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 144:17-144:31 Source: hlint Severity: DsInfo Message: Redundant bracket Found: (readFun fVec) <&> (^?! funCore . _Just . funBody . _Just . _1) Why not: readFun fVec <&> (^?! funCore . _Just . funBody . _Just . _1) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 151:56-151:74 Source: hlint Severity: DsInfo Message: Redundant bracketFound:(53, (Fun "id" Nothing))Why not:(53, Fun "id" Nothing) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 151:82-151:104 Source: hlint Severity: DsInfo Message: Redundant bracketFound:(54, (Fun "idTest" Nothing))Why not:(54, Fun "idTest" Nothing) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 151:112-151:131 Source: hlint Severity: DsInfo Message: Redundant bracketFound:(55, (Fun "Nat" Nothing))Why not:(55, Fun "Nat" Nothing) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 151:139-151:159 Source: hlint Severity: DsInfo Message: Redundant bracketFound:(56, (Fun "zero" Nothing))Why not:(56, Fun "zero" Nothing) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 151:167-151:186 Source: hlint Severity: DsInfo Message: Redundant bracketFound:(57, (Fun "suc" Nothing))Why not:(57, Fun "suc" Nothing) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 151:194-151:213 Source: hlint Severity: DsInfo Message: Redundant bracketFound:(58, (Fun "Vec" Nothing))Why not:(58, Fun "Vec" Nothing) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 151:221-151:241 Source: hlint Severity: DsInfo Message: Redundant bracketFound:(59, (Fun "vnil" Nothing))Why not:(59, Fun "vnil" Nothing) File: /home/t532/code/aqn/app/Main.hs Hidden: no Range: 167:38-167:45 Source: hlint Severity: DsInfo Message: Use idFound:\ z -> zWhy not:id 2021-09-26 00:14:41.684487386 [ThreadId 515] INFO hls: finish: User TypeCheck (took 2.02s) 2021-09-26 00:14:41.7139185 [ThreadId 518] INFO hls: finish: GetHie (took 0.03s) Files that failed: * /home/t532/code/aqn/Setup.hs 2021-09-26 00:14:41.772870192 [ThreadId 523] INFO hls: finish: GenerateCore (took 0.06s) Completed (15 files worked, 1 file failed) ```

Paste the logs from the lsp-client, e.g. for VS Code

LSP logs: ``` [client][INFO] Searching for server executables haskell-language-server-wrapper,haskell-language-server in $PATH [client][INFO] Downloading haskell-language-server [client][INFO] Fetching the latest release from GitHub or from cache [client][INFO] The latest release is 1.4.0 [client][INFO] Figure out the ghc version to use or advertise an installation link for missing components [client][INFO] Working out the project GHC version. This might take a while... [client][INFO] Executing '/home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.4.0-linux--project-ghc-version' in cwd '/home/t532/code/aqn' to get the project or file ghc version [client][INFO] Execution of '/home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.4.0-linux--project-ghc-version' terminated with code 0 [client][INFO] The GHC version for the project or file: 8.10.7 [client][INFO] Search for binary haskell-language-server-Linux-8.10.7 in release assests [client][INFO] Downloading haskell-language-server 1.4.0 for GHC 8.10.7 [client][INFO] Activating the language server in the workspace folder: /home/t532/code/aqn [client][INFO] run command: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7 --lsp -d [client][INFO] debug command: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7 --lsp -d [client][INFO] document selector patten: /home/t532/code/aqn/**/* [client][INFO] Starting language server haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30) Starting (haskell-language-server)LSP server... with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False} with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"] in directory: /home/t532/code/aqn Starting LSP server... If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option! [Info - 上午12:10:05] Connection to server got closed. Server will restart. haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30) Starting (haskell-language-server)LSP server... with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False} with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"] in directory: /home/t532/code/aqn Starting LSP server... If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option! [Info - AM12:10:05] Connection to server got closed. Server will restart. haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30) Starting (haskell-language-server)LSP server... with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False} with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"] in directory: /home/t532/code/aqn Starting LSP server... If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option! [Info - AM12:10:05] Connection to server got closed. Server will restart. haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30) Starting (haskell-language-server)LSP server... with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False} with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"] in directory: /home/t532/code/aqn Starting LSP server... If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option! [Info - AM12:10:05] Connection to server got closed. Server will restart. haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /home/t532/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.4.0-linux-8.10.7) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30) Starting (haskell-language-server)LSP server... with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False} with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"] in directory: /home/t532/code/aqn Starting LSP server... If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option! [Error - AM12:10:05] Connection to server got closed. Server will not be restarted. ```
alissa-tung commented 3 years ago

workaround:

cradle:
  multi:
    - path: "./Setup.hs"
      config:
        cradle:
          direct:
            arguments:
              - "-package Cabal"
              - "-package base"
    - path: "./"
      config:
        cradle:
          stack:

result:

alissa@inductive ~/debug/aqn (git)-[master] % haskell-language-server-wrapper --debug . && echo "ok" 
Found "/home/alissa/debug/aqn/hie.yaml" for "/home/alissa/debug/aqn/a"

Completed (16 files worked, 0 files failed)
haskell-language-server-wrapper --debug .  10.11s user 3.15s system 212% cpu 6.233 total
ok
alissa@inductive ~/debug/aqn (git)-[master] % 

and IDE (VSCode, Emacs) works as expected.


The no obvious reason point is.

Hidden:   no
Range:    1:8-1:27
Source:   not found
Severity: DsError
Message: 
  �[0;91mCould not load module ‘Distribution.Simple’
  It is a member of the hidden package ‘Cabal-3.2.1.0’.
  You can run ‘:set -package Cabal’ to expose it.
  (Note: this unloads all the modules in the current scope.)�[0m
re-xyr commented 3 years ago

@withoutK Thanks for helping - the problem seems to be due to haskell/vscode-haskell#471 and everything works fine on the latest v1.7.1. It is weird though when the HLS crashes it did not display Invalid argument `'.

alissa-tung commented 3 years ago

I am more confused with how it failed and how it works now, afaic it will remain a mystery to me.

(to explain a bit why) According to the log and if it is triggered by the following.

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

  • It is merely produced by the server side of the Haskell language server, it even does not invoke a client (namely, vscode-hls or lsp-haskell).
  • the error messages pointed out the failed file and corresponding reason. Hidden: no Range: 1:8-1:27 Source: not found Severity: DsError Message: �[0;91mCould not load module ‘Distribution.Simple’ It is a member of the hidden package ‘Cabal-3.2.1.0’. You can run ‘:set -package Cabal’ to expose it. (Note: this unloads all the modules in the current scope.)�[0m 2021-09-26 00:14:40.504498705 [ThreadId 155] INFO hls: File: /home/t532/code/aqn/app/Main.hs

with

Files that failed: * /home/t532/code/aqn/Setup.hs 2021-09-26 00:14:41.772870192 [ThreadId 523] INFO hls: finish: GenerateCore (took 0.06s)

Hence I was confused by stating that was caused by an LSP client. (But that's not the main reason, for I had done some experiments with git checkout). Anyway, it is always to test it yourself locally and it would be better to do it for Stack is rather delicate. It would be better to keep client plugins up-to-date for it was pushed to my device yesterday earlier than 19:00 UTC+8.

Anyway, my conclusion can just lead to misleading for I do not write Haskell myself, neither use the Stack, HLS, etc.

re-xyr commented 3 years ago

I remembered it worked on my older machine where I used the short cradle

cradle:
  stack:

on an older version even with the error in Setup.hs present so I think that is unlikely the reason.