#7372: Lint failure in GHC 7.6.1
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
José Romildo Malaquias reports that the attached file makes GHC 7.6.1 give
a Lint error:
{{{
bash-3.1$ c:/fp/ghc-7.6.1/bin/ghc -c applicative-eval.hs -dcore-lint
-fforce-recomp
*** Core Lint errors : in result of Desugar (after optimization) ***
<no location info>: Warning:
In a case alternative: (Main.Cte i_ayo :: GHC.Integer.Type.Integer)
Type of case alternatives not the same as the annotation on case:
Main.Memory -> GHC.Integer.Type.Integer
(->) Main.Memory GHC.Integer.Type.Integer
Control.Applicative.pure
@ ((->) Main.Memory)
$dApplicative_a1b4
@ GHC.Integer.Type.Integer
i_ayo
*** Offending Program ***
....
}}}
However HEAD compiles it just fine.
Sjoerd Visser found that you can avoid the error by replacing
{{{
eval :: Exp -> (->) Memory Integer
}}}
with
{{{
eval :: Exp -> Memory -> Integer
}}}
which should be the same, but apparently isn't internally in GHC.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7372>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs