[GHC] #12089: :kind command allows unsaturated type family,
GHC
ghc-devs at haskell.org
Fri May 20 02:56:44 UTC 2016
#12089: :kind command allows unsaturated type family,
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!hs
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
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12089>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list