From: sewardj Date: Mon, 12 Feb 2001 11:39:48 +0000 (+0000) Subject: [project @ 2001-02-12 11:39:48 by sewardj] X-Git-Tag: Approximately_9120_patches~2675 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=5cf96a33058aafeb6c0b1c3ccf03e4aa92db171c;p=ghc-hetmet.git [project @ 2001-02-12 11:39:48 by sewardj] Check for unboxed tuples and barf, rather than silently generate bogus code. (There will be a proper user-level check higher up, too; this is just for our sanity.) --- diff --git a/ghc/compiler/ghci/ByteCodeGen.lhs b/ghc/compiler/ghci/ByteCodeGen.lhs index 883416e..b3bc21c 100644 --- a/ghc/compiler/ghci/ByteCodeGen.lhs +++ b/ghc/compiler/ghci/ByteCodeGen.lhs @@ -27,7 +27,8 @@ import PrimRep ( PrimRep(..) ) import PrimOp ( PrimOp(..) ) import CoreFVs ( freeVars ) import Type ( typePrimRep ) -import DataCon ( dataConTag, fIRST_TAG, dataConTyCon, dataConWrapId ) +import DataCon ( dataConTag, fIRST_TAG, dataConTyCon, + dataConWrapId, isUnboxedTupleCon ) import TyCon ( TyCon, tyConFamilySize ) import Class ( Class, classTyCon ) import Util ( zipEqual, zipWith4Equal, naturalMergeSortLe, nOfThem ) @@ -440,7 +441,10 @@ schemeT d s p app -- Cases 2 and 3 | otherwise - = code + = if is_con_call && isUnboxedTupleCon con + then pprPanic "Bytecode generator can't handle unboxed tuple constructor" + (ppr con) + else code where -- Extract the args (R->L) and fn