Incorrectly suggests ‘TypeOperators’
Loading the code
{-# Language RankNTypes, GADTs, MagicHash, PolyKinds, TypeInType, ConstraintKinds #-}
import Data.Kind
import GHC.Exts
import qualified Prelude
class Semi (a :: TYPE rep) where
data Free :: forall rep. (TYPE rep -> Constraint) -> TYPE rep -> Type where
Free :: (forall q. ctx q => (p -> q) -> q) -> Free ctx p
gives an incorrect suggestion
GHCi, version 8.2.0.20170507: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( tXMX.hs, interpreted )
Ok, modules loaded: Main.
*Main> :kind Free Semi
Free Semi :: * -> *
*Main> :kind Free Semi Int#
<interactive>:1:1: error:
Not in scope: type constructor or class ‘#’
<interactive>:1:1: error:
Illegal operator ‘#’ in type ‘Free Semi Int #’
Use TypeOperators to allow operators in types
<interactive>:1:1: error:
Operator applied to too few arguments: Free Semi Int #
*Main>
This should recommend enabling MagicHash
instead.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |