Skip to content

:kind command allows unsaturated type family,

data A = B

type family
  F a where
  F B = String

infixr 9 `Compose`
class    (f (g x)) => (f `Compose` g) x
instance (f (g x)) => (f `Compose` g) x

GHCi accepts

ghci> :kind Compose Eq F
Compose Eq F :: A -> Constraint

but when used in code it gets rejected

-- tvI6.hs:13:8-33: error: …
--     • The type family ‘F’ should have 1 argument, but has been given none
--     • In the type signature:
--         foo :: (Eq `Compose` F) a => String
-- Compilation failed.
foo :: (Eq`Compose`F) a => String
foo = undefined 

Bug? Version 8.0.0.20160511

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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information