[Haskell-cafe] A question on datakinds syntax

Haiwei Zhou highfly22 at gmail.com
Fri Jan 13 08:31:20 UTC 2017


Hi,

  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
following:

````
type Var a = Path (a ': '[]) Open

var :: (Typeable a, PathPiece a) => Path (a ': '[]) Open

````

Why there are two difference definition about the same thing?

Thanks,
Haiwei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170113/fed98e09/attachment.html>


More information about the Haskell-Cafe mailing list