[GHC] #10351: Inferred type is rejected
GHC
ghc-devs at haskell.org
Thu Apr 30 08:22:01 UTC 2015
#10351: Inferred type is rejected
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones <simonpj@…>):
In [changeset:"b83160d07e626bee685f329a9a73e90a4a6074ae/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="b83160d07e626bee685f329a9a73e90a4a6074ae"
Tidy up treatment of FlexibleContexts
Previously (Trac #10351) we could get
Non type-variable argument in the constraint: C [t]
(Use FlexibleContexts to permit this)
When checking that `f' has the inferred type
f :: forall t. C [t] => t -> ()
which is a bit stupid: we have *inferred* a type that we
immediately *reject*. This patch arranges that that the
generalisation mechanism (TcSimplify.decideQuantification)
doesn't pick a predicate that will be rejected by the
subsequent validity check.
This forced some minor refactoring, as usual.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10351#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list