X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FdeSugar%2FDsCCall.lhs;fp=compiler%2FdeSugar%2FDsCCall.lhs;h=a041665f23547a6269f24794c5d9cedc1921c5b8;hp=4fe5f2d95162b18422a05c37528213fbeb9b83ca;hb=5e0ea427646a5474dd7c659b0713c6a62d8c99c7;hpb=19e64b50409a331ddf816cb4c7f33d646dabd43a diff --git a/compiler/deSugar/DsCCall.lhs b/compiler/deSugar/DsCCall.lhs index 4fe5f2d..a041665 100644 --- a/compiler/deSugar/DsCCall.lhs +++ b/compiler/deSugar/DsCCall.lhs @@ -161,7 +161,7 @@ unboxArg arg -- Recursive newtypes | Just(rep_ty, co) <- splitNewTypeRepCo_maybe arg_ty - = unboxArg (mkCoerce (mkSymCoercion co) arg) + = unboxArg (mkCoerce co arg) -- Booleans | Just (tc,_) <- splitTyConApp_maybe arg_ty, @@ -401,7 +401,7 @@ resultWrapper result_ty -- Recursive newtypes | Just (rep_ty, co) <- splitNewTypeRepCo_maybe result_ty = resultWrapper rep_ty `thenDs` \ (maybe_ty, wrapper) -> - returnDs (maybe_ty, \e -> mkCoerce co (wrapper e)) + returnDs (maybe_ty, \e -> mkCoerce (mkSymCoercion co) (wrapper e)) -- The type might contain foralls (eg. for dummy type arguments, -- referring to 'Ptr a' is legal).