haskell / haskell/haskell-language-server

Dump TemplateHaskell splices

Open
#3,986 8 comments 0 reactions 0 assignees View on GitHub
type: support
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
4d 3h
Merged PRs (30d)
12

Description

## Your environment

Which OS do you use?
Ubuntu 20.04.6

Which version of GHC do you use and how did you install it?
GHC 9.4.8 via `ghcup`

How is your project built (alternative: link to the project)?
https://github.com/serokell/tztime

Which LSP client (editor/plugin) do you use?
VSCode + [`vscode-haskell`](https://marketplace.visualstudio.com/items?itemName=haskell.haskell)

Which version of HLS do you use and how did you install it?
HLS 2.5.0.0 via `ghcup`

Have you configured HLS in any way (especially: a `hie.yaml` file)?
Just the standard `gen-hie --stack > hie.yaml`

## What's wrong?

I remember being able to add `{-# OPTIONS_GHC -ddump-splices #-}` to a module and vscode would report a warning with the contents of all TH splices.
I tried this again this week, using the latest version of HLS, and no warnings are reported by vscode (though building the project with stack/cabal does print the splices as per usual).

Did something change recently that made this no longer possible?

### Debug information

**EDIT**: To reproduce the old behavior, see this comment: https://github.com/haskell/haskell-language-server/issues/3986#issuecomment-1900227516

To reproduce the problem, simply add `{-# OPTIONS_GHC -ddump-splices #-}` to a module and write some TH splice, e.g.:

```hs
exp :: Integer
exp = $([e| 1 |])
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.