Not just a proposal any more. :-) GHC 7.0 does not generalize local let
bindings in some situations. See here for information:
http://hackage.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7
There is a proposal (from Big Simon) to remove let-generalization:
Yeah, seems to work too.
Отправлено с iPhone
Jun 20, 2011, в 10:55, Corey O'Connor coreyocon...@gmail.com написал(а):
Not just a proposal any more. :-) GHC 7.0 does not generalize local let
bindings in some situations. See here for information:
The fact is that (Num a) context works and (ToWires a, Num a) context
doesn't. At least in 6.12.1.
This still looks to me like a bug.
2011/6/19 Miguel Mitrofanov miguelim...@yandex.ru:
Seems like let-generalization is at work here.
Types of all values in the where section are inferred
GHC 6.12 introduces MonoLocalBinds, which disables polymorphic values
in let statements.
Your original code works for me if I use -XNoMonoLocalBinds
-XNoMonomorphismRestriction.
On Mon, Jun 20, 2011 at 9:02 AM, Serguey Zefirov sergu...@gmail.com wrote:
The fact is that (Num a) context works and
Thank you very much. I'll try that too.
2011/6/20 David Menendez d...@zednenem.com:
GHC 6.12 introduces MonoLocalBinds, which disables polymorphic values
in let statements.
Your original code works for me if I use -XNoMonoLocalBinds
-XNoMonomorphismRestriction.
On Mon, Jun 20, 2011 at 9:02
Defaulting. Inferred type of r is still polymorphic – r :: E ins outs – but
type of x, nextSum and currentSum is defaulted to Integer. Try adding
default () to your program, and you'll see the same error again. Or, if you
enable NoMonomorphismRestriction (or MonoLocalBinds – I didn't know it
Cool. It works.
Thank you very much!
2011/6/19 Miguel Mitrofanov miguelim...@yandex.ru:
Seems like let-generalization is at work here.
Types of all values in the where section are inferred basically as if they
are declared at the top level. Therefore, inheritance fails without
Seems like let-generalization is at work here.
Types of all values in the where section are inferred basically as if they
are declared at the top level. Therefore, inheritance fails without
NoMonomorphismRestriction.
There is a proposal (from Big Simon) to remove let-generalization: