[GHC] #11715: Constraint vs *
GHC
ghc-devs at haskell.org
Wed Jul 25 11:25:48 UTC 2018
#11715: Constraint vs *
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: goldfire
Type: bug | Status: new
Priority: high | Milestone:
Component: Compiler (Type | Version: 8.0.1-rc1
checker) | Keywords: Typeable,
Resolution: | LevityPolymorphism, Roles
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3316
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones <simonpj@…>):
In [changeset:"c5d31df70b16dc346b5860077c8bbe585ddb7a78/ghc"
c5d31df7/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="c5d31df70b16dc346b5860077c8bbe585ddb7a78"
Treat isConstraintKind more consistently
It turned out that we were not being consistent
about our use of isConstraintKind.
It's delicate, because the typechecker treats Constraint and Type as
/distinct/, whereas they are the /same/ in the rest of the compiler
(Trac #11715).
And had it wrong, which led to Trac #15412. This patch does the
following:
* Rename isConstraintKind to tcIsConstraintKind
returnsConstraintKind to tcReturnsConstraintKind
to emphasise that they use the 'tcView' view of types.
* Move these functions, and some related ones (tcIsLiftedTypeKind),
from Kind.hs, to group together in Type.hs, alongside isPredTy.
It feels very unsatisfactory that these 'tcX' functions live in Type,
but it happens because isPredTy is called later in the compiler
too. But it's a consequence of the 'Constraint vs Type' dilemma.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11715#comment:81>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list