[commit: ghc] wip/generalized-arrow: Try simplifying mkFunCo.mkRuntimeRepCo (8626f9c)
git at git.haskell.org
git at git.haskell.org
Fri Mar 25 23:24:33 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/generalized-arrow
Link : http://ghc.haskell.org/trac/ghc/changeset/8626f9c9d20291da021524c715ddd94746ffbed9/ghc
>---------------------------------------------------------------
commit 8626f9c9d20291da021524c715ddd94746ffbed9
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sat Mar 26 00:14:55 2016 +0100
Try simplifying mkFunCo.mkRuntimeRepCo
>---------------------------------------------------------------
8626f9c9d20291da021524c715ddd94746ffbed9
compiler/types/Coercion.hs | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index 37e57a8..b365f72 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -580,13 +580,7 @@ mkFunCo r co1 co2 =
-- for each co :: (t1 :: TYPE r1) ~ (t2 :: TYPE r2)
-- we need rep_co :: r1 ~ r2
mkRuntimeRepCo :: Coercion -> Coercion
- mkRuntimeRepCo co
- | Just (tc, [rep]) <- splitTyConAppCo_maybe $ mkKindCo co
- , tc == tYPETyCon
- = rep
- | otherwise
- = pprPanic "mkFunCo.mkRuntimeRepCo"
- (ppr co $$ ppr co1 <+> arrow <+> ppr co2)
+ mkRuntimeRepCo = mkNthCo 0 . mkKindCo
-- | Make nested function 'Coercion's
More information about the ghc-commits
mailing list