#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: | ---------------------------------+------------------------------------------
Old description: > 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. New description: José Romildo Malaquias reports that the attached file (requires `parsec` unfortunately) 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. -- Comment(by simonpj): I'm guessing that this is another manifestation of #7312, which is fixed and which should be in 7.6.2. But it would be good if someone could check. Simon -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7372#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs