[GHC] #12553: Reference kind in a type instance declaration defined in another instance declaration
GHC
ghc-devs at haskell.org
Tue Aug 30 18:33:04 UTC 2016
#12553: Reference kind in a type instance declaration defined in another instance
declaration
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Iceland_jack):
If I constrain the types `Domain a :: Sig Type -> Type`, `Internal a ::
Type` this fails
{{{#!hs
-- • Expected kind ‘Sig Type -> Type’,
-- but ‘dom’ has kind ‘Sig a -> Type’
-- • In the type ‘dom’
-- In the type instance declaration for ‘Domain’
-- In the instance declaration for ‘Syntactic (AST dom (Full a))’
--
-- • Expected a type, but ‘a1’ has kind ‘a’
-- • In the type ‘a’
-- In the type instance declaration for ‘Internal’
-- In the instance declaration for ‘Syntactic (AST dom (Full a))’
instance Syntactic (AST dom (Full a)) where
type Domain (AST dom (Full a)) = dom
type Internal (AST dom (Full a)) = a
}}}
and I have to restrict the kind of `AST` to
{{{#!hs
data AST :: (Sig Type -> Type) -> (Sig Type -> Type) where
}}}
Boo! :)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12553#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list