You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/troubleshooting.md
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -63,13 +63,15 @@ Often this means that the client is configured to run the wrong binary, or the c
63
63
64
64
The easiest way to check whether the server is running is to use an OS process monitor to see if there is a `haskell-language-server` process running.
65
65
66
-
### Checking whether the client is connecting to the server
66
+
### Problems with Template Haskell
67
67
68
-
If the server is running, you should see some kind of indicator in your client.
69
-
In some clients (e.g. `coc`) you may need to run a command to query the client's beliefs about the server state.
70
-
If the client doesn't seem to be connected despite the server running, this may indicate a bug in the client or HLS.
68
+
Due to how Template Haskell code is evaluated at compile time and some limitations in the interaction between HLS and GHC, the loading of modules using TH can be problematic.
71
69
72
-
### Checking whether the project is being built correctly by HLS
70
+
The errors thrown are usually related to linking and usually make HLS crash: `Segmentation fault`, `GHC runtime linker: fatal error`, etc
71
+
72
+
A workaround which has helped in some cases is to compile HLS from source with the ghc option `-dynamic` enabled, as in the previous issue.
73
+
74
+
We have a [dedicated label](https://github.com/haskell/haskell-language-server/issues?q=is%3Aissue+is%3Aopen+label%3A%22type%3A+template+haskell+related%22) in the issue tracker and an [general issue](https://github.com/haskell/haskell-language-server/issues/1431) tracking support for TH.
73
75
74
76
HLS needs to build the project correctly, with the correct flags, and if it does not do so then very little is likely to work.
75
77
A typical symptom of this going wrong is "incorrect" compilation errors being sent to the client.
0 commit comments