[GHC] #10176: Invalid core generated with GHC 7.10 RC3
GHC
ghc-devs at haskell.org
Sat Mar 21 14:36:45 UTC 2015
#10176: Invalid core generated with GHC 7.10 RC3
-------------------------------------+-------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.10.1
Component: Compiler | Version: 7.10.1-rc3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by nomeata):
After adding a lint check as suggested by SPJ, I simplified your example
to
{{{
module Buggy(buggy) where
{-# NOINLINE error1Arg #-}
error1Arg :: () -> a
error1Arg _ = undefined
{-# NOINLINE buggy #-}
buggy :: a
buggy = error1Arg () ()
}}}
but I’m not sure if the lint check is actually correct here, as this is
the core it complains about:
{{{
*** Core Lint errors : in result of Simplifier ***
Buggy.hs:9:10: Warning:
[in body of lambda with binder a_an8 :: *]
No alternatives for HNF scrutinee error1Arg @ (() -> a_an8) ()
*** Offending Program ***
error1Arg [InlPrag=NOINLINE] :: forall a_an0. () -> a_an0
[LclId, Arity=2, CallArity=2, Str=DmdType <B,A>b]
error1Arg =
\ (@ a_anf) _ [Occ=Dead, Dmd=<B,A>] -> undefined @ a_anf
buggy [InlPrag=NOINLINE] :: forall a_amZ. a_amZ
[LclIdX, Str=DmdType b]
buggy =
\ (@ a_an8) -> case error1Arg @ (() -> a_an8) () of wild_00 { }
*** End of Offense ***
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10176#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list