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=4fe5f2d95162b18422a05c37528213fbeb9b83ca;hp=0541f5d97f6f608836e922cf63737cd441ba3fb0;hb=6fcf90065dc4e75b7dc6bbf238a9891a71ae5a86;hpb=5ed1437f5cda8190cc6538284cf0dc761549db8e diff --git a/compiler/deSugar/DsCCall.lhs b/compiler/deSugar/DsCCall.lhs index 0541f5d..4fe5f2d 100644 --- a/compiler/deSugar/DsCCall.lhs +++ b/compiler/deSugar/DsCCall.lhs @@ -34,7 +34,7 @@ import Type ( Type, isUnLiftedType, mkFunTys, mkFunTy, splitRecNewType_maybe, splitForAllTy_maybe, isUnboxedTupleType ) -import Coercion ( Coercion, splitRecNewTypeCo_maybe, mkSymCoercion ) +import Coercion ( Coercion, splitNewTypeRepCo_maybe, mkSymCoercion ) import PrimOp ( PrimOp(..) ) import TysPrim ( realWorldStatePrimTy, intPrimTy, byteArrayPrimTyCon, mutableByteArrayPrimTyCon, @@ -160,7 +160,7 @@ unboxArg arg = returnDs (arg, \body -> body) -- Recursive newtypes - | Just(rep_ty, co) <- splitRecNewTypeCo_maybe arg_ty + | Just(rep_ty, co) <- splitNewTypeRepCo_maybe arg_ty = unboxArg (mkCoerce (mkSymCoercion co) arg) -- Booleans @@ -399,7 +399,7 @@ resultWrapper result_ty (LitAlt (mkMachInt 0),[],Var falseDataConId)]) -- Recursive newtypes - | Just (rep_ty, co) <- splitRecNewTypeCo_maybe result_ty + | Just (rep_ty, co) <- splitNewTypeRepCo_maybe result_ty = resultWrapper rep_ty `thenDs` \ (maybe_ty, wrapper) -> returnDs (maybe_ty, \e -> mkCoerce co (wrapper e))