summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Graf <sgraf1337@gmail.com>2019-09-23 15:40:19 +0000
committerSebastian Graf <sgraf1337@gmail.com>2019-09-23 15:40:19 +0000
commit32ffe8f505edb33a39ee1cd7a8e1cba5f1a12fb1 (patch)
tree0be74003a221aabbe26be6f974396f99343c787d
parent68ddb43c44065d0d3a8a6893f7f8e87f15ee9c1e (diff)
downloadhaskell-wip/pmcheck-predtype-leftovers.tar.gz
Some leftovers from !1732. Comments only [skip ci]wip/pmcheck-predtype-leftovers
-rw-r--r--compiler/deSugar/PmOracle.hs3
-rw-r--r--compiler/deSugar/PmTypes.hs4
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/deSugar/PmOracle.hs b/compiler/deSugar/PmOracle.hs
index ef90d8d2d8..2b88bb61e7 100644
--- a/compiler/deSugar/PmOracle.hs
+++ b/compiler/deSugar/PmOracle.hs
@@ -542,7 +542,8 @@ nameTyCt (TyCt pred_ty) = do
idname = mkInternalName unique occname noSrcSpan
return (mkLocalId idname pred_ty)
--- | Check whether a set of type constraints is satisfiable.
+-- | Add some extra type constraints to the 'TyState'; return 'Nothing' if we
+-- find a contradiction (e.g. @Int ~ Bool@).
tyOracle :: TyState -> Bag TyCt -> DsM (Maybe TyState)
tyOracle (TySt inert) cts
= do { evs <- traverse nameTyCt cts
diff --git a/compiler/deSugar/PmTypes.hs b/compiler/deSugar/PmTypes.hs
index 0e0f91839d..ee89cf7eb7 100644
--- a/compiler/deSugar/PmTypes.hs
+++ b/compiler/deSugar/PmTypes.hs
@@ -509,8 +509,8 @@ instance Outputable VarInfo where
initTmState :: TmState
initTmState = TmSt emptySDIE
--- | The type oracle state. A poor man's inert set: The invariant is that all
--- constraints in there are mutually compatible.
+-- | The type oracle state. A poor man's 'TcSMonad.InsertSet': The invariant is
+-- that all constraints in there are mutually compatible.
newtype TyState = TySt (Bag EvVar)
-- | Not user-facing.