From: simonmar Date: Tue, 12 Jul 2005 14:41:00 +0000 (+0000) Subject: [project @ 2005-07-12 14:41:00 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~360 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=55f1fadd08d6d5bf135f97be1314377eeb98de7d;p=ghc-hetmet.git [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). --- 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