From e70ae1fe4b2b4dfeccf359a9e36eafa801a4ac54 Mon Sep 17 00:00:00 2001 From: Tobias Dammers Date: Tue, 27 Mar 2018 12:19:49 +0200 Subject: Define MCoercion type --- compiler/types/Coercion.hs | 2 +- compiler/types/TyCoRep.hs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs index 7a7918c250..f55cab128a 100644 --- a/compiler/types/Coercion.hs +++ b/compiler/types/Coercion.hs @@ -10,7 +10,7 @@ -- module Coercion ( -- * Main data type - Coercion, CoercionN, CoercionR, CoercionP, + Coercion, CoercionN, CoercionR, CoercionP, MCoercion, UnivCoProvenance, CoercionHole, LeftOrRight(..), Var, CoVar, TyCoVar, Role(..), ltRole, diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index 588963d012..9323e23de6 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -34,6 +34,7 @@ module TyCoRep ( UnivCoProvenance(..), CoercionHole(..), coHoleCoVar, CoercionN, CoercionR, CoercionP, KindCoercion, + MCoercion, -- * Functions over types mkTyConTy, mkTyVarTy, mkTyVarTys, @@ -857,6 +858,10 @@ type CoercionR = Coercion -- always representational type CoercionP = Coercion -- always phantom type KindCoercion = CoercionN -- always nominal +-- | A semantically more meaningful type to represent what may or may not be a +-- useful 'Coercion'. +data MCoercion = MRefl | MCo Coercion + {- Note [Refl invariant] ~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.1