From 55f1fadd08d6d5bf135f97be1314377eeb98de7d Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 12 Jul 2005 14:41:00 +0000 Subject: [PATCH] [project @ 2005-07-12 14:41:00 by simonmar] Give a more helpful error message on platforms for which FFI support isn't implemented in GHCi (namely x86_64 at the moment). --- ghc/compiler/ghci/ByteCodeFFI.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/ghci/ByteCodeFFI.lhs b/ghc/compiler/ghci/ByteCodeFFI.lhs index 8c9f249..06c1aa1 100644 --- a/ghc/compiler/ghci/ByteCodeFFI.lhs +++ b/ghc/compiler/ghci/ByteCodeFFI.lhs @@ -11,9 +11,11 @@ module ByteCodeFFI ( mkMarshalCode, moan64 ) where import Outputable import SMRep ( CgRep(..), cgRepSizeW ) import ForeignCall ( CCallConv(..) ) +import Panic -- DON'T remove apparently unused imports here .. -- there is ifdeffery below +import Control.Exception ( throwDyn ) import DATA_BITS ( Bits(..), shiftR, shiftL ) import Foreign ( newArray ) import Data.List ( mapAccumL ) @@ -637,7 +639,7 @@ mkMarshalCode_wrk cconv (r_offW, r_rep) addr_offW arg_offs_n_reps #else - = error "mkMarshalCode not implemented for this platform." + = throwDyn (InstallationError "foreign import is not implemented for GHCi on this platform.") #endif -- 1.7.10.4