[commit: ghc] wip/tdammers/T11735-2: Simplification as per #11735 (6d1c43c)
git at git.haskell.org
git at git.haskell.org
Tue Jan 30 12:24:01 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tdammers/T11735-2
Link : http://ghc.haskell.org/trac/ghc/changeset/6d1c43c6886cb7d283fa1345b55d6d03ecfa5ef9/ghc
>---------------------------------------------------------------
commit 6d1c43c6886cb7d283fa1345b55d6d03ecfa5ef9
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)
>---------------------------------------------------------------
6d1c43c6886cb7d283fa1345b55d6d03ecfa5ef9
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 9ccbf50..770c94f 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -1804,7 +1804,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
@@ -1814,11 +1814,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