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

git at git.haskell.org git at git.haskell.org
Thu Mar 22 11:02:12 UTC 2018


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

On branch  : wip/tdammers/D4394
Link       : http://ghc.haskell.org/trac/ghc/changeset/28ff8db516843a073c0554047dd47f8dabf66ff2/ghc

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

commit 28ff8db516843a073c0554047dd47f8dabf66ff2
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)


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

28ff8db516843a073c0554047dd47f8dabf66ff2
 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