google / google/ghc-source-gen
Build error with GHC 8.10.7 in ghc-source-gen-0.4.4.0
- Dominant language
- Haskell
- Stars
- 101
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
When building with GHC 8.10.7, I get this error:
```
[10 of 25] Compiling GHC.SourceGen.Module ( src/GHC/SourceGen/Module.hs, dist/build/GHC/SourceGen/Module.o, dist/build/GHC/SourceGen/Module.dyn_o )
src/GHC/SourceGen/Module.hs:191:41: error:
Variable not in scope: unqual :: OccNameStr -> RdrNameStr
|
191 | (map (wrappedName . unqual) cs)
| ^^^^^^
```
This appears to have broken due to #103, which split
```haskell
import GHC.SourceGen.Name
( RdrNameStr, ModuleNameStr(unModuleNameStr), OccNameStr, unqual )
```
into
```haskell
#if MIN_VERSION_ghc(9,0,0)
import GHC.SourceGen.Name (unqual)
#endif
#if MIN_VERSION_ghc(9,4,0)
import GHC.SourceGen.Name (RdrNameStr, ModuleNameStr(unModuleNameStr), OccNameStr)
```
However the usage of `unqual` at `src/GHC/SourceGen/Module.hs:191` appears to be outside any `#if`, so I think `GHC.SourceGen.Name` needs to be imported unconditionally (at least `unqual`).
Or, if the intent was that GHC 9.0.0 is now the minimum supported version, the cabal file needs to be updated (and a revision pushed to Hackage) so that 0.4.4.0 isn't selected when building on older compilers.
Contributor guide
Assessment
This issue has not been assessed yet.