diff options
| author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2006-09-20 17:38:27 +0000 |
|---|---|---|
| committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2006-09-20 17:38:27 +0000 |
| commit | 5ed1437f5cda8190cc6538284cf0dc761549db8e (patch) | |
| tree | 46fda8cc8bccfd375ce837060c8d5624c089e45f /compiler | |
| parent | 4a7acfe8e74b4367c8043db7b824f203bf13ce00 (diff) | |
| download | haskell-5ed1437f5cda8190cc6538284cf0dc761549db8e.tar.gz | |
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
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/basicTypes/DataCon.lhs | 1 | ||||
| -rw-r--r-- | compiler/basicTypes/MkId.lhs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs index 486745cd1d..2fc802413f 100644 --- a/compiler/basicTypes/DataCon.lhs +++ b/compiler/basicTypes/DataCon.lhs @@ -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 } diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs index 47ca1b04e1..0a1902eb85 100644 --- a/compiler/basicTypes/MkId.lhs +++ b/compiler/basicTypes/MkId.lhs @@ -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) |
