Flip direction of newtype coercions, fix some comments
[ghc-hetmet.git] / compiler / stranal / WwLib.lhs
index 3383cb4..f10cb22 100644 (file)
@@ -238,8 +238,8 @@ mkWWargs fun_ty demands one_shots
        -- simply coerces.
   = mkWWargs rep_ty demands one_shots  `thenUs` \ (wrap_args, wrap_fn_args, work_fn_args, res_ty) ->
     returnUs (wrap_args,
-             \ e -> Cast (wrap_fn_args e) co,
-             \ e -> work_fn_args (Cast e (mkSymCoercion co)),
+             \ e -> Cast (wrap_fn_args e) (mkSymCoercion co),
+             \ e -> work_fn_args (Cast e co),
              res_ty)
   | notNull demands
   = getUniquesUs               `thenUs` \ wrap_uniqs ->