Skip to content

Core Lint error with breakpoints + unfoldings

Tests jtod_circint and T1735 fail Lint when using ghci with optimizations (the ghci-opt way).

In both cases, the failure boils down to:

module Signal where

class Signal a where
  or3 :: a -> a
  or3 a = a
module Bit where
import Signal

instance Signal Bool where
./stage1/bin/ghc -O -dlint --interactive -fno-unoptimized-core-for-interpreter Bit
GHCi, version 9.9.20230703: https://www.haskell.org/ghc/  :? for help
[1 of 2] Compiling Signal           ( Signal.hs, interpreted )
[2 of 2] Compiling Bit              ( Bit.hs, interpreted )
*** Core Lint errors : in result of Compulsory Unfolding of $dmor3 ***
<no location info>: warning:
    Out of scope: a1_iFn :: a_iFk
                  [LclId]
    In an imported unfolding
    In the body of lambda with binder a_iFk :: *
    In the body of lambda with binder $dSignal_iFl :: Signal a_iFk
    In the body of lambda with binder a1_iFm :: a_iFk
    Substitution: <InScope = {a_iFk}
                   IdSubst   = []
                   TvSubst   = [iFk :-> a_iFk]
                   CvSubst   = []>
*** Offending Program ***
\ (@a_iFk) ($dSignal_iFl :: Signal a_iFk) (a1_iFm :: a_iFk) ->
  break<Signal,0>(a1_iFn) a1_iFm

Right now, they are marked as broken because of #23272 (closed), but fixing 23272 does not fix them - it's a separate bug.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information