Skip to content

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

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 (closed) may be an instance of this.

Edited by batterseapower
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information