Implict parameters and monomorphism

Marcin 'Qrczak' Kowalczyk
25 Apr 2001 07:19:39 GMT

Tue, 24 Apr 2001 16:04:54 -0700, Simon Peyton-Jones <> pisze:

> Choice (C) really says "the monomorphism restriction doesn't apply
> to implicit parameters".  Which is fine, but remember that every 
> innocent binding 'x = ...' that mentions an implicit parameter in
> the RHS becomes a *function* of that parameter, called at each
> use of 'x'.  Now, the chances are that there are no intervening 'with'
> clauses that bind ?y, so a decent compiler should common up all 
> those function calls.  So I think I strongly favour (C).  Indeed,
> one could make a similar argument for abolishing the monomorphism
> restriction altogether.

I agree!

 __("<  Marcin Kowalczyk *
  ^^                      SYGNATURA ZASTĘPCZA