[commit: ghc] master: Remove dead code: mkNthCoRole (076bdb3)

git at git.haskell.org git at git.haskell.org
Thu Jan 25 17:20:39 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/076bdb36cf93b453ed08a36224e7d67b15be7162/ghc

>---------------------------------------------------------------

commit 076bdb36cf93b453ed08a36224e7d67b15be7162
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jan 25 09:58:17 2018 +0000

    Remove dead code: mkNthCoRole


>---------------------------------------------------------------

076bdb36cf93b453ed08a36224e7d67b15be7162
 compiler/types/Coercion.hs | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index 3f83b09..cec56b1 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -29,7 +29,7 @@ module Coercion (
         mkAxInstLHS, mkUnbranchedAxInstLHS,
         mkPiCo, mkPiCos, mkCoCast,
         mkSymCo, mkTransCo, mkTransAppCo,
-        mkNthCo, mkNthCoRole, mkLRCo,
+        mkNthCo, mkLRCo,
         mkInstCo, mkAppCo, mkAppCos, mkTyConAppCo, mkFunCo, mkFunCos,
         mkForAllCo, mkForAllCos, mkHomoForAllCos, mkHomoForAllCos_NoRefl,
         mkPhantomCo,
@@ -804,15 +804,6 @@ mkTransCo co1 (Refl {}) = co1
 mkTransCo (Refl {}) co2 = co2
 mkTransCo co1 co2       = TransCo co1 co2
 
--- the Role is the desired one. It is the caller's responsibility to make
--- sure this request is reasonable
-mkNthCoRole :: Role -> Int -> Coercion -> Coercion
-mkNthCoRole role n co
-  = downgradeRole role nth_role $ nth_co
-  where
-    nth_co = mkNthCo n co
-    nth_role = coercionRole nth_co
-
 mkNthCo :: Int -> Coercion -> Coercion
 mkNthCo 0 (Refl _ ty)
   | Just (tv, _) <- splitForAllTy_maybe ty



More information about the ghc-commits mailing list