Shift length check breaks Core Lint
Currently T16449_2
fails in the nightly CI job due a Core Lint error:
Compile failed (exit code 1) errors were:
[1 of 1] Compiling Main ( T16449_2.hs, T16449_2.o )
*** Core Lint errors : in result of Simplifier ***
<no location info>: warning:
In the expression: I#
(runtimeError @ 'WordRep @ Word# "Bad shift length 1000"#)
This argument does not satisfy the let/app invariant:
runtimeError @ 'WordRep @ Word# "Bad shift length 1000"#
*** Offending Program ***
main_s1Nc :: String
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 140 0}]
main_s1Nc
= showSignedInt
$fShow(,)1
(I# (runtimeError @ 'WordRep @ Word# "Bad shift length 1000"#))
([] @ Char)
main :: IO ()
[LclIdX,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 60}]
main = hPutStr' stdout main_s1Nc True
main_s2Vg :: State# RealWorld -> (# State# RealWorld, () #)
[LclId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}]
main_s2Vg = runMainIO1 @ () main
main :: IO ()
[LclIdX,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}]
main
= main_s2Vg
`cast` (Sym (N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #)) ~R# IO ())
$trModule_s2Vh :: Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
$trModule_s2Vh = "main"#
$trModule_s2Vi :: TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$trModule_s2Vi = TrNameS $trModule_s2Vh
$trModule_s2Vj :: Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
$trModule_s2Vj = "Main"#
$trModule_s2Vk :: TrNamevariant.
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$trModule_s2Vk = TrNameS $trModule_s2Vj
$trModule :: Module
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$trModule = Module $trModule_s2Vi $trModule_s2Vk
*** End of Offense ***
<no location info>: error:
Compilation had errors
*** unexpected failure for T16449_2(optasm)
It looks like the shift length check introduced by 1503da32 ends up breaking the let/app invariant.