Opened 10 years ago

Closed 9 years ago

#4186 closed bug (fixed)

-dcore-lint and -fstrict-dicts break anything that uses a type class

Reported by: LouisWasserman Owned by: simonpj
Priority: normal Milestone: 7.2.1
Component: Compiler Version: 6.12.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by batterseapower)

lowasser@lowasser:~$ cat Foo2.hs
module Foo2 where

foo = return 0 :: IO Int
lowasser@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

4181 may be an instance of this.

Change History (9)

comment:1 Changed 9 years ago by igloo

Milestone: 6.14.1
Priority: normalhigh

Thanks for the report.

comment:2 Changed 9 years ago by igloo

Blocking: 4237 added

(In #4237) Thanks for the report. Let's see if fixing either #4186 or #4172 fixes this before looking into it.

comment:3 Changed 9 years ago by igloo

Owner: set to simonpj

I'm still seeing this, despite #4172 / #4237 being believed fixed.

Simon, looks like your area.

comment:4 Changed 9 years ago by simonpj

Blocked By: 4232 added
Priority: highnormal

It's quite an independent bug. Actually I don't think -fdicts-strict has ever worked. I'm not sure why it's put as high priority because at most it's an experimental performance improvement possibility. I don't really want to look at it until the new typechecker changes are in (because it touches some of the same code).

If it's more important than I think, yell.

Simon

comment:5 Changed 9 years ago by igloo

Blocking: 4237 removed

comment:6 Changed 9 years ago by igloo

Blocked By: 4232 removed

comment:7 Changed 9 years ago by igloo

Milestone: 7.0.17.0.2

comment:8 Changed 9 years ago by igloo

Milestone: 7.0.27.2.1

comment:9 Changed 9 years ago by batterseapower

Description: modified (diff)
Resolution: fixed
Status: newclosed

I can't reproduce this with HEAD (actually, 7.1.20110517) so I'm closing the bug.

Note: See TracTickets for help on using tickets.