[Haskell-cafe] Re: Type System (Was: Currying and Partial
Evaluation)
Achim Schneider
barsoap at web.de
Tue Jan 8 21:39:30 EST 2008
"Alfonso Acosta" <alfonso.acosta at gmail.com> wrote:
> 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
^^^^^^^^^^^^^^^
Yes, exactly that wire which isn't obscured by the boiler plate has
kindled my interest.
> 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
--
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited.
More information about the Haskell-Cafe
mailing list