summaryrefslogtreecommitdiff
path: root/compiler/types
diff options
context:
space:
mode:
authorSebastian Graf <sgraf1337@gmail.com>2019-09-16 16:04:00 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-21 09:52:34 -0400
commit1ea8c451375be9829df22e87213137e71c9c05ac (patch)
tree1ac781519986068f4b852c62ca58a24147d25c76 /compiler/types
parent0dad81ca5fd1f63bf8a3b6ad09787559e8bd05c0 (diff)
downloadhaskell-1ea8c451375be9829df22e87213137e71c9c05ac.tar.gz
PredType for type constraints in the pattern match checker instead of EvVar
Using EvVars for capturing type constraints implied side-effects in DsM when we just wanted to *construct* type constraints. But giving names to type constraints is only necessary when passing Givens to the type checker, of which the majority of the pattern match checker should be unaware. Thus, we simply generate `newtype TyCt = TyCt PredType`, which are nicely stateless. But at the same time this means we have to allocate EvVars when we want to query the type oracle! So we keep the type oracle state as `newtype TyState = TySt (Bag EvVar)`, which nicely makes a distinction between new, unchecked `TyCt`s and the inert set in `TyState`.
Diffstat (limited to 'compiler/types')
-rw-r--r--compiler/types/TyCoRep.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 51ad630372..065efcd417 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -860,12 +860,12 @@ see Note [Required quantifiers in the type of a term] in TcExpr.
********************************************************************** -}
--- | A type of the form @p@ of kind @Constraint@ represents a value whose type is
+-- | A type of the form @p@ of constraint kind represents a value whose type is
-- the Haskell predicate @p@, where a predicate is what occurs before
-- the @=>@ in a Haskell type.
--
--- We use 'PredType' as documentation to mark those types that we guarantee to have
--- this kind.
+-- We use 'PredType' as documentation to mark those types that we guarantee to
+-- have this kind.
--
-- It can be expanded into its representation, but:
--