summaryrefslogtreecommitdiff
path: root/ghc/compiler/utils/StringBuffer.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/compiler/utils/StringBuffer.lhs')
-rw-r--r--ghc/compiler/utils/StringBuffer.lhs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ghc/compiler/utils/StringBuffer.lhs b/ghc/compiler/utils/StringBuffer.lhs
index eea0af2b65..d776c5fcd7 100644
--- a/ghc/compiler/utils/StringBuffer.lhs
+++ b/ghc/compiler/utils/StringBuffer.lhs
@@ -13,8 +13,10 @@ module StringBuffer
-- creation/destruction
hGetStringBuffer, -- :: FilePath -> IO StringBuffer
+#ifdef GHCI
stringToStringBuffer, -- :: String -> IO StringBuffer
freeStringBuffer, -- :: StringBuffer -> IO ()
+#endif
-- Lookup
currentChar, -- :: StringBuffer -> Char
@@ -180,6 +182,7 @@ unsafeWriteBuffer s@(StringBuffer a _ _ _) i# ch# =
-- Turn a String into a StringBuffer
\begin{code}
+#ifdef GHCI
stringToStringBuffer :: String -> IO StringBuffer
stringToStringBuffer str =
do let sz@(I# sz#) = length str + 1
@@ -195,6 +198,7 @@ stringToStringBuffer str =
freeStringBuffer :: StringBuffer -> IO ()
freeStringBuffer (StringBuffer a# _ _ _) = Foreign.free (Ptr (A# a#))
+#endif
\end{code}
-----------------------------------------------------------------------------