[commit: ghc] wip/hasfield: Add a mysterious reverse to correct evidence for HasField (94a4e8f)

git at git.haskell.org git at git.haskell.org
Sat Oct 8 16:15:43 UTC 2016


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

On branch  : wip/hasfield
Link       : http://ghc.haskell.org/trac/ghc/changeset/94a4e8fbd14e237914a7d3d3a93f6030f3ba9454/ghc

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

commit 94a4e8fbd14e237914a7d3d3a93f6030f3ba9454
Author: Adam Gundry <adam at well-typed.com>
Date:   Sat Oct 8 16:15:50 2016 +0100

    Add a mysterious reverse to correct evidence for HasField


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

94a4e8fbd14e237914a7d3d3a93f6030f3ba9454
 compiler/typecheck/TcInteract.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index a725eb8..9df4585 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -2237,7 +2237,7 @@ matchHasField dflags clas tys@[_k_ty, x_ty, r_ty, a_ty] loc
                where
                 co       = mkTcFunCo Nominal (mkTcReflCo Nominal r_ty)
                                              (evTermCoercion ev)
-                body     = mkHsWrap (mkWpCastN co <.> mkWpTyApps rep_tc_args)
+                body     = mkHsWrap (mkWpCastN co <.> mkWpTyApps (reverse rep_tc_args))
                                     (HsVar (noLoc sel_id))
                 ax       = case tcInstNewTyCon_maybe (classTyCon clas) tys of
                              Just x  -> snd x



More information about the ghc-commits mailing list