[GHC] #12045: Visible kind application
GHC
ghc-devs at haskell.org
Tue Jan 10 11:17:10 UTC 2017
#12045: Visible kind application
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: Iceland_jack
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.1
Resolution: | Keywords:
| TypeApplications TypeInType
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2216
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Iceland_jack):
We can rewrite
{{{#!hs
type Typeable1 (a :: Type -> Type) = Typeable a
type Typeable2 (a :: Type -> Type -> Type) = Typeable a
type Typeable3 (a :: Type -> Type -> Type -> Type) = Typeable a
...
}}}
as the more natural
{{{#!hs
type Typeable1 = Typeable @(Type -> Type)
type Typeable2 = Typeable @(Type -> Type -> Type)
type Typeable3 = Typeable @(Type -> Type -> Type -> Type)
...
}}}
which is how it appears in
> {{{#!hs
> type Typeable1 = Typeable @(* -> *)
> }}}
> — ExplicitTypeApplication#Typekindinstantiationinclasses
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12045#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list