haskell / haskell/error-messages
Helpful "not in scope before the splice" went missing in 9.0
- Dominant language
- No language data
- Stars
- 76
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
In the program below, `c` is not in scope where `a` is defined because of the intervening TH splice. The error message in 8.10 was helpful
```
test18.hs:6:5: error:
• Variable not in scope: c :: Int
• ‘c’ (line 11) is not in scope before the splice on line 8
```
In 9.0 the error message became unhelpful
```
test18.hs:6:5: error: Variable not in scope: c :: Int
```
----
```haskell
{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH.Syntax
a :: Int
a = c
$(pure [])
c :: Int
c = 0
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the diagnostic with the supplied test18.hs Template Haskell example and compare the 8.10 and 9.0 outputs. Trace the handling of the out-of-scope reference across the intervening splice; done means the 9.0 diagnostic again explains that c is not in scope before the splice on line 8.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100