Core lint error/warnings with `primitive-0.5.1.0`
When compiling primitive-0.5.1.0 with --ghc-option=-dcore-lint
,
GHC 7.4.2 just emits a single warning:
[10 of 10] Compiling Data.Primitive.MutVar ( Data/Primitive/MutVar.hs, dist/build/Data/Primitive/MutVar.o )
*** Core Lint warnings : in result of Desugar (after optimization) ***
<no location info>:
[RHS of $c/=_a724 :: forall s_a70h a_a70i.
Data.Primitive.MutVar.MutVar s_a70h a_a70i
-> Data.Primitive.MutVar.MutVar s_a70h a_a70i -> GHC.Types.Bool]
INLINE binder is (non-rule) loop breaker: $c/=_a724
However, with GHC 7.6.3, an error is produced:
[ 5 of 10] Compiling Data.Primitive.Types ( Data/Primitive/Types.hs, dist/build/Data/Primitive/Types.o )
*** Core Lint errors : in result of Desugar (after optimization) ***
<no location info>: Warning:
In the type `GHC.Prim.State# GHC.Prim.RealWorld
~ GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO)'
Kind application error in
type `GHC.Prim.State# GHC.Prim.RealWorld
~ GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO)'
Function kind = forall (k_1c :: BOX). k_1c -> k_1c -> Constraint
Arg kinds = [(*, BOX), (GHC.Prim.State# GHC.Prim.RealWorld, #),
(GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO),
#)]
<no location info>: Warning:
In the type `GHC.Prim.State# GHC.Prim.RealWorld
~ GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO)'
Kind application error in
type `GHC.Prim.State# GHC.Prim.RealWorld
~ GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO)'
Function kind = forall (k_1c :: BOX). k_1c -> k_1c -> Constraint
Arg kinds = [(*, BOX), (GHC.Prim.State# GHC.Prim.RealWorld, #),
(GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO),
#)]
{-# LINE 142 "Data/Primitive/Types.hs #-}: Warning:
[RHS of cobox_a2gR :: GHC.Prim.State# GHC.Prim.RealWorld
~ GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO)]
The type of this binder doesn't match the type of its RHS: cobox_a2gR
Binder's type: GHC.Prim.State# GHC.Prim.RealWorld
~ GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO)
Rhs type: GHC.Prim.State# GHC.Prim.RealWorld
~ GHC.Prim.State# (Control.Monad.Primitive.PrimState GHC.Types.IO)
The core-lint error persists in GHC HEAD/7.7, blocking us from updating GHC's in-tree primitive
/vector
packages.
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | highest |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | bos |
Operating system | |
Architecture |