GHC5.0 restricted bindings broken
How did this compiler get thru its regression tests?
x () = y where y = 1
yields:
N.hs:4:
Could not deduce `Num t' from the context ()
Probable fix:
Add `Num t' to the banding(s) for {y}
arising from the literal `1' at N.hs:4
in the definition of function `y': 1
After a glance thru TcBinds, I see that in
`generalise', under the `RESTRICTED CASE', it calls
`generalise_help' to do most of the work. However,
`generalise_help' only appears to be designed to handle
the UNrestricted case, judging from the comments.
The good news is that the second implicit param bug is
probably just an instance of this same bug.
Trac metadata
Trac field |
Value |
Version |
None |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
highest |
Resolution |
ResolvedInvalid |
Component |
Compiler (Type checker) |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|