Skip to content

Compiling with -g fails -lint-core checks

Compiling the attached file produces:

$ inplace/bin/ghc-stage2 -O -dcore-lint -g -c Data.Fixed.hs
*** Core Lint errors : in result of Simplifier ***
<no location info>: warning:
    [RHS of str_s2UI :: Addr#]
    The type of this binder is unlifted: str_s2UI
    Binder's type: Addr#
*** Offending Program ***
...
str_s2UI :: Addr#
[LclId,
 Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
str_s2UI = src<Data.Fixed.hs:78:31-39> "MkFixed"#

str_a2j4 :: String
[LclId,
 Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=True,
         WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
str_a2j4 = src<Data.Fixed.hs:78:31-39> unpackCString# str_s2UI
...

This came up when I wanted to compile GHC HEAD with -g. There are a couple of related tickets, but some of them didn't reproduce. This is a small, self-contained example. I'm hoping that it would be possible to solve this without fully solving #14123 (closed) which seems to have bigger scope.

My HEAD is d2511e3b.

Trac metadata
Trac field Value
Version
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Debugging)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC bgamari, simonmar, simonpj
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information