foralls in newtypes

Hal Daume III hdaume@ISI.EDU
Wed, 16 Oct 2002 07:54:17 -0700 (PDT)


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 Daume III

 "Computer science is no more about computers    | hdaume@isi.edu
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume