[Haskell-beginners] Re: permuting a list

Felipe Lessa felipe.lessa at gmail.com
Fri Feb 13 05:03:27 EST 2009

On Fri, Feb 13, 2009 at 7:56 AM, Daniel Fischer
<daniel.is.fischer at web.de> wrote:
> You need the forall a to bring the type variable a into scope. Without it, the
> a in
> arr0 <- (newListArray (0, n) xs :: IO (IOArray Int a))
> would be implicitly universally quantified, too, and you would say that all
> elements of xs had type (forall b. b), which means all are _|_.
> Having brought the a from permute's type signature into scope, the a in the
> above line is the *same* a as the one in permute's type signature.

Whoops, sorry about that, didn't see that ScopedTypeVariables was active. :)


More information about the Beginners mailing list