[commit: ghc] wip/tdammers/D4394: Fixed unused variables (fe5a03c)
git at git.haskell.org
git at git.haskell.org
Thu Mar 22 11:02:18 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tdammers/D4394
Link : http://ghc.haskell.org/trac/ghc/changeset/fe5a03c1c02131aa2c790f1f0b2a6c14fe96fd3b/ghc
>---------------------------------------------------------------
commit fe5a03c1c02131aa2c790f1f0b2a6c14fe96fd3b
Author: Tobias Dammers <tdammers at gmail.com>
Date: Mon Mar 5 15:18:41 2018 +0100
Fixed unused variables
>---------------------------------------------------------------
fe5a03c1c02131aa2c790f1f0b2a6c14fe96fd3b
compiler/types/Coercion.hs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index 8550e85..1e529f7 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -826,8 +826,8 @@ mkNthCo r n co
good_call
-- If the Coercion passed in is between forall-types, then the Int must
-- be 0 and the role must be Nominal.
- | Just (tv1, _) <- splitForAllTy_maybe ty1
- , Just (tv2, _) <- splitForAllTy_maybe ty2
+ | Just (_tv1, _) <- splitForAllTy_maybe ty1
+ , Just (_tv2, _) <- splitForAllTy_maybe ty2
= n == 0 && r == Nominal
-- If the Coercion passed in is between T tys and T tys', then the Int
@@ -1288,12 +1288,12 @@ mkCoCast c g
-- g1 :: s1 ~# s2
-- g2 :: t1 ~# t2
(tc, _) = splitTyConApp (pFst $ coercionKind g)
- (n_args, role)
- | tc `hasKey` eqPrimTyConKey = (4, Nominal)
- | tc `hasKey` eqReprPrimTyConKey = (4, Representational)
- | tc `hasKey` eqTyConKey = (3, Nominal)
- | tc `hasKey` heqTyConKey = (4, Nominal)
- | tc `hasKey` coercibleTyConKey = (3, Representational)
+ n_args
+ | tc `hasKey` eqPrimTyConKey = 4
+ | tc `hasKey` eqReprPrimTyConKey = 4
+ | tc `hasKey` eqTyConKey = 3
+ | tc `hasKey` heqTyConKey = 4
+ | tc `hasKey` coercibleTyConKey = 3
| otherwise = pprPanic "mkCoCast" (ppr g $$ ppr (coercionKind g))
co_list = decomposeCo (tyConArity tc) g (tyConRolesRepresentational tc)
g1 = co_list `getNth` (n_args - 2)
More information about the ghc-commits
mailing list