Re: foralls in newtypes

2002-10-16 Thread Andrew J Bromage
G'day all. On Wed, Oct 16, 2002 at 07:54:17AM -0700, Hal Daume III wrote: > I was reading the HFL libs, namely Control.Monad.Logic, and there's a > definition in there: > > newtype Logic a = Logic { mkLogic :: (forall b. (a -> b -> b) -> b -> b) } > > I'm curious why this is legal, but > > ne

foralls in newtypes

2002-10-16 Thread Hal Daume III
I was reading the HFL libs, namely Control.Monad.Logic, and there's a definition in there: newtype Logic a = Logic { mkLogic :: (forall b. (a -> b -> b) -> b -> b) } I'm curious why this is legal, but newtype Logic2 a = forall b . Logic2 ((a -> b -> b) -> b -> b) is not... - Hal -- Hal Daum