John Hughes wrote:
> We can construct rather large polymorphic values, which have
> to be converted in linear time to the same value of a
> different type.
>
>
> All true, but I doubt whether any of this is a big deal. MLers already live
> with their "value restriction", w
John Hughes wrote:
| `x := []' wouldn't be problematic, just monomorphic.
| That is, x must be used consistently as a list of a
| particular type.
Just to check if I understand you correctly. In your
proposal, does the following thing share `x
Thu, 25 Oct 2001 09:47:31 +, Levent Erkok <[EMAIL PROTECTED]> pisze:
> Another place where `:=' bindings are badly needed is the recursive
> do-notation (mdo, as supported in hugs.) In an mdo, let bindings
> have to be monomorphic, because they are passed back to the mfix
> loop in a lambda b
On Thu, Oct 25, 2001 at 09:47:31AM +, Levent Erkok wrote:
> Another place where `:=' bindings are badly needed is the recursive
> do-notation (mdo, as supported in hugs.) In an mdo, let bindings have
> to be monomorphic, because they are passed back to the mfix loop in a
> lambda binding. Henc
On Thursday 25 October 2001 07:21 am, John Hughes wrote:
> My proposal is that := should bind *monomorphically* -- just like lambda
> binding. The motivation for that is that a polymorphic function can easily
> become overloaded after a small change to the program, such as adding
> removal of dupl
Hi!
The binding form := must absolutely have a completely monomorphic type.
A while back I posted the result that the MR kills principal types in
Haskell. The problem with the MR is exactly that it introduces types
which may be polymorphic but not overloaded. So if we want to regain
principal typ
John Hughes wrote:
| `x := []' wouldn't be problematic, just monomorphic.
| That is, x must be used consistently as a list of a
| particular type.
Just to check if I understand you correctly. In your
proposal, does the following thing share `x'?
let x = fac 100 in x + x
(My understanding
John Hughes wrote:
> What we need is different binding syntax for monomorphic and polymorphic
> bindings. Roll on := and = ...
I agree absolutely that we need such a distinction. Although it's
worth clarifying a point. The monomorphism restriction doesn
John Hughes wrote:
> What we need is different binding syntax for monomorphic and polymorphic
> bindings. Roll on := and = ...
I agree absolutely that we need such a distinction. Although it's worth clarifying a
point. The monomorphism restriction doesn't exclude polymorphism, just overloadin
John Hughes wrote:
> What we need is different binding syntax for monomorphic and polymorphic
> bindings. Roll on := and = ...
If I recall correctly, in some earlier language (KRC?)
this difference was achieved by letting let-bindings be
polymorp
John Hughes wrote:
> What we need is different binding syntax for monomorphic and polymorphic
> bindings. Roll on := and = ...
If I recall correctly, in some earlier language (KRC?)
this difference was achieved by letting let-bindings be
polymorphic, and where-bindings be monomorphic.
The ide
John Hughes wrote:
> I noticed today that the presence or absence of a type signature can
> change the RESULT of an expression in Hugs and GHC nowadays. Here's an
> example:
>
> a = (let x = ?x in
> x with ?x = 1)
>
John,
As I recall, this was something we addressed in the original paper,
indicating the extreme danger of the monomorphism restriction in the
context of implicit paramters. They simply don't mix.
Down with the MR. Let's settle on a viable alternative as soon as possible.
On the more general
Tue, 23 Oct 2001 08:00:34 -0700, Jeffrey R Lewis <[EMAIL PROTECTED]> pisze:
> The best solution is to find a good way to eliminate the DMR.
Separating syntaxes of function definition and pattern binding would
have the right effect IMHO, but it's a radical change which breaks
compatibility and cu
John Hughes wrote:
> I noticed today that the presence or absence of a type signature can
> change the RESULT of an expression in Hugs and GHC nowadays. Here's an
> example:
>
> a = (let x = ?x in
> x with ?x = 1)
> with ?x = 2
> -- a == 2
>
> b = (let x :: (?x :: Int
John Hughes wrote:
| I noticed today that the presence or absence of a type
| signature can change the RESULT of an expression in
| Hugs and GHC nowadays.
This has been a property of the Haskell language since the
defaulting mechanism already!
Here is an example:
a = let x = 1 in show x
I noticed today that the presence or absence of a type signature can
change the RESULT of an expression in Hugs and GHC nowadays. Here's an
example:
a = (let x = ?x in
x with ?x = 1)
with ?x = 2
-- a == 2
b = (let x :: (?x :: Integer) => Integer
x = ?x
17 matches
Mail list logo