X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FDsCCall.lhs;h=a041665f23547a6269f24794c5d9cedc1921c5b8;hb=27ca67931713c36f5ed248de88298416892e5649;hp=4fe5f2d95162b18422a05c37528213fbeb9b83ca;hpb=6fcf90065dc4e75b7dc6bbf238a9891a71ae5a86;p=ghc-hetmet.git 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).