[GHC] #14993: QuantifiedConstraints and principal types
GHC
ghc-devs at haskell.org
Tue Apr 3 01:11:33 UTC 2018
#14993: QuantifiedConstraints and principal types
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.5
Resolution: | Keywords:
| QuantifiedConstraints, wipT2893
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by AntC):
Aha! I'd forgotten OutsideIn(X) entertains implication constraints.
If you're looking for explanation/documentation, section **4.2.1**
(starting "costs to the programmer", "costs to the type inference engine")
explain the rationale, and it still stands. Simon's saying quantified
constraints must be explicitly given by a signature, never inferred.
That's in line with many exotic type system features; and makes perfect
sense.
Would be worth testing the examples from section **2.4** by giving an
explicit signature same as what the paper says would be inferred. Does
that get `-XQuantifiedConstraints` to accept them?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14993#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list