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

git at git.haskell.org git at git.haskell.org
Tue Mar 20 11:53:41 UTC 2018


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

On branch  : wip/tdammers/D4394
Link       : http://ghc.haskell.org/trac/ghc/changeset/3d56a05115053eb24f3c07c97b38f06f6d949288/ghc

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

commit 3d56a05115053eb24f3c07c97b38f06f6d949288
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)


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

3d56a05115053eb24f3c07c97b38f06f6d949288
 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 5c9da1b..56341d0 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -1826,7 +1826,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
@@ -1836,11 +1836,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