Update the panic msg from #1257 to be an ordinary error, not a panic
authorSimon Marlow <simonmar@microsoft.com>
Fri, 18 May 2007 12:12:29 +0000 (12:12 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Fri, 18 May 2007 12:12:29 +0000 (12:12 +0000)
We don't support arbitrary unboxed tuples in GHCi right now.

compiler/ghci/ByteCodeGen.lhs

index 3f147c5..479d35d 100644 (file)
@@ -1376,13 +1376,14 @@ lookupBCEnv_maybe = lookupFM
 idSizeW :: Id -> Int
 idSizeW id = cgRepSizeW (typeCgRep (idType id))
 
+-- See bug #1257
 unboxedTupleException :: a
 unboxedTupleException 
    = throwDyn 
-        (Panic 
-           ("Bytecode generator can't handle unboxed tuples.  Possibly due\n" ++
-            "\tto foreign import/export decls in source.  Workaround:\n" ++
-            "\tcompile this module to a .o file, then restart session."))
+        (ProgramError 
+           ("Error: bytecode compiler can't handle unboxed tuples.\n"++
+            "  Possibly due to foreign import/export decls in source.\n"++
+            "  Workaround: use -fobject-code, or compile this module to .o separately."))
 
 
 mkSLIDE n d = if d == 0 then nilOL else unitOL (SLIDE n d)