[Haskell-cafe] A question on datakinds syntax
allbery.b at gmail.com
Fri Jan 13 16:20:52 UTC 2017
Haddock displays kind annotations oddly. At a guess (which could well be
off base; I'm still rather weak on this stuff), Spock has PolyKinds
enabled, so an explicit (x :: *) kind annotation must be preserved as an
override to the default of allowing any kind; if PolyKinds is not enabled,
then * is the default kind and wouldn't be annotated. (Reader beware: * is
not a wildcard/"match any", it is specifically the kind of inhabited boxed
On Fri, Jan 13, 2017 at 3:31 AM, Haiwei Zhou <highfly22 at gmail.com> wrote:
> I am reading the document of spock-0.11, and found two strange
> definitions in the Web.Spock.
> type Var a = Path ((:) * a ( *)) Open
> var :: (Typeable * a, PathPiece a) => Path ((:) * a ( *)) Open
> What's the meaning of the star between Typeable and a ?
> The kind of Typeable is * -> *. I cannot understand why the Typeable in
> the var prototype takes two kinds.
> In the Web.Routing.Combinators of reroute-0.4, those are defined as
> type Var a = Path (a ': ') Open
> var :: (Typeable a, PathPiece a) => Path (a ': ') Open
> Why there are two difference definition about the same thing?
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe