
#8355: Core lint error/warnings with `primitive-0.5.1.0` ----------------------------+---------------------------------------------- Reporter: hvr | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.8.1 Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC rejects valid program Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | ----------------------------+---------------------------------------------- When compiling [http://hackage.haskell.org/package/primitive-0.5.1.0 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8355 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler