[commit: ghc] wip/tdammers/D4394: Simplification as per #11735 (2adc093)

git at git.haskell.org git at git.haskell.org
Tue Mar 27 14:28:28 UTC 2018


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

On branch  : wip/tdammers/D4394
Link       : http://ghc.haskell.org/trac/ghc/changeset/2adc093c63b0d44d3e669b6fed844c6e7e5d107d/ghc

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

commit 2adc093c63b0d44d3e669b6fed844c6e7e5d107d
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)


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

2adc093c63b0d44d3e669b6fed844c6e7e5d107d
 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 9c78b4b..4cc8cef 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -1797,7 +1797,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
@@ -1807,11 +1807,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