Commit 60d338f5 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add a couple of HasDebugCallStack contexts

Just for future (and past) debugging...
parent 8674883c
...@@ -426,7 +426,7 @@ mkHeteroCoercionType Phantom = panic "mkHeteroCoercionType" ...@@ -426,7 +426,7 @@ mkHeteroCoercionType Phantom = panic "mkHeteroCoercionType"
-- | Given a coercion @co1 :: (a :: TYPE r1) ~ (b :: TYPE r2)@, -- | Given a coercion @co1 :: (a :: TYPE r1) ~ (b :: TYPE r2)@,
-- produce a coercion @rep_co :: r1 ~ r2@. -- produce a coercion @rep_co :: r1 ~ r2@.
mkRuntimeRepCo :: Coercion -> Coercion mkRuntimeRepCo :: HasDebugCallStack => Coercion -> Coercion
mkRuntimeRepCo co mkRuntimeRepCo co
= mkNthCo 0 kind_co = mkNthCo 0 kind_co
where where
...@@ -1530,7 +1530,7 @@ liftCoSubstWith r tvs cos ty ...@@ -1530,7 +1530,7 @@ liftCoSubstWith r tvs cos ty
-- that coerces between @lc_left(ty)@ and @lc_right(ty)@, where -- that coerces between @lc_left(ty)@ and @lc_right(ty)@, where
-- @lc_left@ is a substitution mapping type variables to the left-hand -- @lc_left@ is a substitution mapping type variables to the left-hand
-- types of the mapped coercions in @lc@, and similar for @lc_right@. -- types of the mapped coercions in @lc@, and similar for @lc_right@.
liftCoSubst :: Role -> LiftingContext -> Type -> Coercion liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion
liftCoSubst r lc@(LC subst env) ty liftCoSubst r lc@(LC subst env) ty
| isEmptyVarEnv env = Refl r (substTy subst ty) | isEmptyVarEnv env = Refl r (substTy subst ty)
| otherwise = ty_co_subst lc r ty | otherwise = ty_co_subst lc r ty
......
...@@ -42,7 +42,7 @@ coVarRole :: CoVar -> Role ...@@ -42,7 +42,7 @@ coVarRole :: CoVar -> Role
mkCoercionType :: Role -> Type -> Type -> Type mkCoercionType :: Role -> Type -> Type -> Type
data LiftingContext data LiftingContext
liftCoSubst :: Role -> LiftingContext -> Type -> Coercion liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion
seqCo :: Coercion -> () seqCo :: Coercion -> ()
coercionKind :: Coercion -> Pair Type coercionKind :: Coercion -> Pair Type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment