
30 Nov
2017
30 Nov
'17
6:49 a.m.
Hello Marcus, On Thu, Nov 30, 2017 at 12:37:12PM +0100, Marcus Manning wrote:
2.) How do I define a function which takes a 3-Kinded Type:
let f:: h (g a); f a = a
where g * -> * and h (*->*)->*, but it did not work as:
h is deduced to be h * -> *.
h hasn't got kind * -> * -> *, as Maybe hasn't got kind * -> * -> * but * -> *. A simple type constructor like the one you are searching for is Either λ> :k Either Either :: * -> * -> * or a tuple λ> :k (,) (,) :: * -> * -> *