[Haskell-cafe] Re: Mysterious fact

2010-11-08 Thread Ertugrul Soeylemez
Andrew Coppin 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 example; it

[Haskell-cafe] Re: Mysterious fact

2010-11-03 Thread Jon Fairbairn
Lennart Augustsson 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 the nomenclature of Pon

Re: [Haskell-cafe] Re: Mysterious fact

2010-11-02 Thread Lennart Augustsson
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 wrote: > Andrew Coppin writes: > >> The other day, I accidentally came up with this: >> >> |{-# LANGUAGE

[Haskell-cafe] Re: Mysterious fact

2010-11-02 Thread Jon Fairbairn
Andrew Coppin 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 one exam