From 5cf96a33058aafeb6c0b1c3ccf03e4aa92db171c Mon Sep 17 00:00:00 2001 From: sewardj Date: Mon, 12 Feb 2001 11:39:48 +0000 Subject: [PATCH] [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.) --- ghc/compiler/ghci/ByteCodeGen.lhs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 1.7.10.4