diff options
Diffstat (limited to 'libraries/ghci')
-rw-r--r-- | libraries/ghci/GHCi/BreakArray.hs | 4 | ||||
-rw-r--r-- | libraries/ghci/GHCi/InfoTable.hsc | 10 | ||||
-rw-r--r-- | libraries/ghci/ghci.cabal.in | 13 |
3 files changed, 19 insertions, 8 deletions
diff --git a/libraries/ghci/GHCi/BreakArray.hs b/libraries/ghci/GHCi/BreakArray.hs index 8d0e7495ba..41a2ab498f 100644 --- a/libraries/ghci/GHCi/BreakArray.hs +++ b/libraries/ghci/GHCi/BreakArray.hs @@ -19,7 +19,7 @@ module GHCi.BreakArray ( BreakArray -#ifdef GHCI +#if defined(HAVE_INTERPRETER) (BA) -- constructor is exported only for ByteCodeGen , newBreakArray , getBreak @@ -29,7 +29,7 @@ module GHCi.BreakArray #endif ) where -#ifdef GHCI +#if defined(HAVE_INTERPRETER) import Prelude -- See note [Why do we import Prelude here?] import Control.Monad import Data.Word diff --git a/libraries/ghci/GHCi/InfoTable.hsc b/libraries/ghci/GHCi/InfoTable.hsc index 87d8f8f167..826e3bc2fd 100644 --- a/libraries/ghci/GHCi/InfoTable.hsc +++ b/libraries/ghci/GHCi/InfoTable.hsc @@ -10,13 +10,13 @@ -- module GHCi.InfoTable ( -#ifdef GHCI +#if defined(HAVE_INTERPRETER) mkConInfoTable #endif ) where import Prelude -- See note [Why do we import Prelude here?] -#ifdef GHCI +#if defined(HAVE_INTERPRETER) import Foreign import Foreign.C import GHC.Ptr @@ -27,13 +27,13 @@ import qualified Data.ByteString as BS #endif ghciTablesNextToCode :: Bool -#ifdef TABLES_NEXT_TO_CODE +#if defined(TABLES_NEXT_TO_CODE) ghciTablesNextToCode = True #else ghciTablesNextToCode = False #endif -#ifdef GHCI /* To end */ +#if defined(HAVE_INTERPRETER) /* To end */ -- NOTE: Must return a pointer acceptable for use in the header of a closure. -- If tables_next_to_code is enabled, then it must point the the 'code' field. -- Otherwise, it should point to the start of the StgInfoTable. @@ -387,4 +387,4 @@ wORD_SIZE = (#const SIZEOF_HSINT) conInfoTableSizeB :: Int conInfoTableSizeB = wORD_SIZE + itblSize -#endif /* GHCI */ +#endif /* HAVE_INTERPRETER */ diff --git a/libraries/ghci/ghci.cabal.in b/libraries/ghci/ghci.cabal.in index 728927d3ce..f4c49137cc 100644 --- a/libraries/ghci/ghci.cabal.in +++ b/libraries/ghci/ghci.cabal.in @@ -22,6 +22,11 @@ Flag ghci Default: False Manual: True +Flag ext-interp + Description: Build external interpreter support + Default: True + Manual: True + source-repository head type: git location: https://gitlab.haskell.org/ghc/ghc.git @@ -48,7 +53,7 @@ library UnboxedTuples if flag(ghci) - CPP-Options: -DGHCI + CPP-Options: -DHAVE_INTERNAL_INTERPRETER exposed-modules: GHCi.Run GHCi.CreateBCO @@ -56,6 +61,12 @@ library GHCi.Signals GHCi.TH + if flag(ext-interp) + CPP-Options: -DHAVE_EXTERNAL_INTERPRETER + + if flag(ghci) || flag(ext-interp) + CPP-Options: -DHAVE_INTERPRETER + include-dirs: @FFIIncludeDir@ exposed-modules: |