summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Graf <sgraf1337@gmail.com>2019-09-23 15:40:19 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-24 01:06:40 -0400
commit146f26cc984240cea8c86ba4a82ab7b50230b2a3 (patch)
tree461f22a855b62cc67467956ae2be7d192834136b
parent238b58e436a24fcb76846f24b37c90b873ef2bef (diff)
downloadhaskell-146f26cc984240cea8c86ba4a82ab7b50230b2a3.tar.gz
Some leftovers from !1732. Comments only [skip ci]
-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.