The dreaded M-R
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Mon Jan 30 08:55:36 EST 2006
John Hughes <rjmh at cs.chalmers.se> writes:
> By the way, you leave out a lot of type signatures too. Your Djinn
> module contains 29 declarations with type signatures--and 17
> without. The 17 are local, but local declarations are precisely
> those where, without the M-R, a lack of sharing would be most likely
> to bite.
Local definitions are rarely used polymorphically.
Perhaps without a type signature the definition should be polymorphic
and recomputed if it's global, and monomorphic and shared if it's local.
This is how it works in Clean: =: defines a shared constant, => defines
a nullary function, and = is equivalent to =: locally and to => globally,
irrespective of a type signature.
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the Haskell-prime
mailing list