[GHC] #10351: Inferred type is rejected
GHC
ghc-devs at haskell.org
Wed May 6 13:40:28 UTC 2015
#10351: Inferred type is rejected
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | typecheck/should_fail/T10351
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by simonpj):
The difficulty before is that GHC would infer a type ''and then complain
that its own inferred type was illegal''. That seems confusing.
Moreover sometimes, if it had simply refrained from generalising over that
constraint, the program would have been accepted. So the change means
that strictly more programs are accepted.
But as you discovered, failing to generalise over a constraint may mean
that it is reported as unsolved; and only when you fix that does it ask
for `FlexibleContexts`.
I'm open to suggestions, but the new behaviour seems cleaner to me.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10351#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list