[Haskell-cafe] Re: Type System (Was: Currying and Partial Evaluation)

Alfonso Acosta alfonso.acosta at gmail.com
Tue Jan 8 21:32:00 EST 2008


On Jan 9, 2008 1:07 AM, Achim Schneider <barsoap at web.de> wrote:
> > Beg pardon?  Are you referring to the type of y being described with
> > 'b' instead of 'a'?
> >
> Yes.

"(a -> a) -> a" and  "(b -> b) -> b" are equivalent.

For some reason ghc uses b instead of a if you are picky about it,
just provide a  type signature explicitly.

Prelude> let {y :: (a -> a) -> a ; y f = f $ y f}
Prelude> :t y
y :: (a -> a) -> a


More information about the Haskell-Cafe mailing list