Re: [Haskell-cafe] Problem with existential quantification

2008-09-26 Thread Eric
Thanks! E. David Menendez wrote: On Thu, Sep 25, 2008 at 1:15 PM, Eric <[EMAIL PROTECTED]> wrote: Dear all, I've written a function with the following type: build :: Bifunctor s => (forall b. (s a b -> b) -> b) -> Fix s a When I try to compile I get the following error: Illegal poly

Re: [Haskell-cafe] Problem with existential quantification

2008-09-25 Thread Henning Thielemann
On Thu, 25 Sep 2008, David Menendez wrote: That looks like it should work. I'm guessing you enabled ExistentialQuantification, but not Rank2Types or RankNTypes. The former allows you to use the forall keyword in data declarations, but you need one of the others to allow universal quantification

Re: [Haskell-cafe] Problem with existential quantification

2008-09-25 Thread David Menendez
On Thu, Sep 25, 2008 at 1:15 PM, Eric <[EMAIL PROTECTED]> wrote: > Dear all, > > I've written a function with the following type: > > build :: Bifunctor s => (forall b. (s a b -> b) -> b) -> Fix s a > > When I try to compile I get the following error: > > Illegal polymorphic or qualified type:

[Haskell-cafe] Problem with existential quantification

2008-09-25 Thread Eric
Dear all, I've written a function with the following type: build :: Bifunctor s => (forall b. (s a b -> b) -> b) -> Fix s a When I try to compile I get the following error: Illegal polymorphic or qualified type: forall b. (s a b -> b) -> b In the type signature for `build': build :: (Bifu