[commit: ghc] wip/tdammers/T11735: Simplification as per #11735 (4eb140f)
git at git.haskell.org
git at git.haskell.org
Thu Jan 25 20:16:06 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tdammers/T11735
Link : http://ghc.haskell.org/trac/ghc/changeset/4eb140f564189270b12c992911aec6974f940cc3/ghc
>---------------------------------------------------------------
commit 4eb140f564189270b12c992911aec6974f940cc3
Author: Tobias Dammers <tdammers at gmail.com>
Date: Thu Jan 25 11:16:30 2018 +0100
Simplification as per #11735
(https://ghc.haskell.org/trac/ghc/ticket/11735#comment:19)
>---------------------------------------------------------------
4eb140f564189270b12c992911aec6974f940cc3
compiler/types/Coercion.hs | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index 36874a4..08d9f5b 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -1815,7 +1815,7 @@ coercionRole = go
where
(Pair ty1 ty2, r) = coercionKindRole co
go (LRCo {}) = Nominal
- go (InstCo co arg) = go_app co [arg]
+ go (InstCo co arg) = go_app co
go (CoherenceCo co1 _) = go co1
go (KindCo {}) = Nominal
go (SubCo _) = Representational
@@ -1825,11 +1825,9 @@ coercionRole = go
go_var = coVarRole
-------------
- go_app :: Coercion -> [Coercion] -> Role
- -- Collect up all the arguments and apply all at once
- -- See Note [Nested InstCos]
- go_app (InstCo co arg) args = go_app co (arg:args)
- go_app co args = go co
+ go_app :: Coercion -> Role
+ go_app (InstCo co arg) = go_app co
+ go_app co = go co
{-
Note [Nested InstCos]
More information about the ghc-commits
mailing list