Point-Free Style : Haskell doesn't like it ?
Glynn Clements
glynn.clements@virgin.net
Mon, 5 May 2003 07:25:58 +0100
Ahn Ki-yung wrote:
> I wan't to know why Haskell doesn't like pooint-free style.
>
> For example, 0) and 1) are Unresolved top-level overloading,
> but 2) is accepted by the type system.
>
> 0) show' = show
> 1) show' = (\x->show x)
> 2) show x = show x
>
> What are the differences between 0), 1) and 2) ?
> They must have the same type.
This is due to the monomorphism restriction; see:
http://www.haskell.org/onlinereport/decls.html#sect4.5.5
--
Glynn Clements <glynn.clements@virgin.net>