Andrew Coppin andrewcop...@btinternet.com wrote:
The other day, I accidentally came up with this:
|{-# LANGUAGE RankNTypes #-}
type Either x y= forall r. (x - r) - (y - r) - r
left :: x - Either x y
left x f g= f x
right :: y - Either x y
right y f g= g y
This is one
Lennart Augustsson lenn...@augustsson.net writes:
Jon, you beat me to it. I was going to mention Ponder.
Strange chance; yesterday was the first time I read haskell café
for something like half a year.
But Ponder did have a builtin type, it had the function type built in. :)
Well, to use
Andrew Coppin andrewcop...@btinternet.com writes:
The other day, I accidentally came up with this:
|{-# LANGUAGE RankNTypes #-}
type Either x y= forall r. (x - r) - (y - r) - r
left :: x - Either x y
left x f g= f x
right :: y - Either x y
right y f g= g y
|
This is
Jon, you beat me to it. I was going to mention Ponder.
But Ponder did have a builtin type, it had the function type built in. :)
-- Lennart
On Tue, Nov 2, 2010 at 9:47 PM, Jon Fairbairn
jon.fairba...@cl.cam.ac.uk wrote:
Andrew Coppin andrewcop...@btinternet.com writes:
The other day, I