[GHC] #4186: -dcore-lint and -fstrict-dicts break anything that uses a type class
GHC
cvs-ghc at haskell.org
Fri May 20 10:00:46 CEST 2011
#4186: -dcore-lint and -fstrict-dicts break anything that uses a type class
-----------------------------+----------------------------------------------
Reporter: LouisWasserman | Owner: simonpj
Type: bug | Status: closed
Priority: normal | Milestone: 7.2.1
Component: Compiler | Version: 6.12.3
Resolution: fixed | Keywords:
Testcase: | Blockedby:
Difficulty: | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
-----------------------------+----------------------------------------------
Changes (by batterseapower):
* status: new => closed
* resolution: => fixed
Old description:
> {{{
> lowasser at lowasser:~$ cat Foo2.hs
> module Foo2 where
>
> foo = return 0 :: IO Int
> lowasser at lowasser:~$ ghc --make Foo2 -fforce-recomp -fdicts-strict
> -XRank2Types -dcore-lint
> [1 of 1] Compiling Foo2 ( Foo2.hs, Foo2.o )
> *** Core Lint Errors: in result of Desugar ***
> {-# LINE 3 "Foo2.hs #-}:
> [RHS of $dMonad_adw :: GHC.Base.Monad GHC.Types.IO]
> Recursive or top-level binder has strict demand info: $dMonad_adw
> Binder's demand info: T
> *** Offending Program ***
> Rec {
> Foo2.foo :: GHC.Types.IO GHC.Types.Int
> LclIdX
> []
> Foo2.foo =
> letrec {
> $dMonad_adw :: GHC.Base.Monad GHC.Types.IO
> LclId
> []
> $dMonad_adw = GHC.Base.$fMonadIO;
> return_adv :: forall a_adu. a_adu -> GHC.Types.IO a_adu
> LclId
> []
> return_adv = GHC.Base.return @ GHC.Types.IO $dMonad_adw; } in
> return_adv @ GHC.Types.Int (GHC.Types.I# 0)
> foo_adx :: GHC.Types.IO GHC.Types.Int
> LclId
> []
> foo_adx = Foo2.foo
> end Rec }
>
> *** End of Offense ***
>
> <no location info>:
> Compilation had errors
>
> }}}
>
> [ticket:4181] may be an instance of this.
New description:
{{{
lowasser at lowasser:~$ cat Foo2.hs
module Foo2 where
foo = return 0 :: IO Int
lowasser at lowasser:~$ ghc --make Foo2 -fforce-recomp -fdicts-strict
-XRank2Types -dcore-lint
[1 of 1] Compiling Foo2 ( Foo2.hs, Foo2.o )
*** Core Lint Errors: in result of Desugar ***
{-# LINE 3 "Foo2.hs #-}:
[RHS of $dMonad_adw :: GHC.Base.Monad GHC.Types.IO]
Recursive or top-level binder has strict demand info: $dMonad_adw
Binder's demand info: T
*** Offending Program ***
Rec {
Foo2.foo :: GHC.Types.IO GHC.Types.Int
LclIdX
[]
Foo2.foo =
letrec {
$dMonad_adw :: GHC.Base.Monad GHC.Types.IO
LclId
[]
$dMonad_adw = GHC.Base.$fMonadIO;
return_adv :: forall a_adu. a_adu -> GHC.Types.IO a_adu
LclId
[]
return_adv = GHC.Base.return @ GHC.Types.IO $dMonad_adw; } in
return_adv @ GHC.Types.Int (GHC.Types.I# 0)
foo_adx :: GHC.Types.IO GHC.Types.Int
LclId
[]
foo_adx = Foo2.foo
end Rec }
*** End of Offense ***
<no location info>:
Compilation had errors
}}}
[ticket:4181] may be an instance of this.
--
Comment:
I can't reproduce this with HEAD (actually, 7.1.20110517) so I'm closing
the bug.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4186#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list