Commit 5ed1437f authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

fixed bug in product unboxing

Mon Sep 18 14:48:53 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
  * fixed bug in product unboxing
  Sat Aug  5 21:46:18 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
    * fixed bug in product unboxing
    Mon Jul 17 09:10:34 EDT 2006  kevind@bu.edu
parent 4a7acfe8
......@@ -693,6 +693,7 @@ deepSplitProductType_maybe ty
; let {result
| isNewTyCon tycon && not (isRecursiveTyCon tycon)
= deepSplitProductType_maybe (newTyConInstRhs tycon tycon_args)
| isNewTyCon tycon = Nothing -- cannot unbox through recursive newtypes
| otherwise = Just res}
; result
}
......
......@@ -630,7 +630,7 @@ mkProductBox arg_ids ty
(tycon, tycon_args, pack_con, con_arg_tys) = splitProductType "mkProductBox" ty
result_expr
| isNewTyCon tycon
| isNewTyCon tycon && not (isRecursiveTyCon tycon)
= wrap (mkProductBox arg_ids (newTyConInstRhs tycon tycon_args))
| otherwise = mkConApp pack_con (map Type tycon_args ++ map Var arg_ids)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment