From: sof Date: Mon, 25 Aug 1997 22:21:46 +0000 (+0000) Subject: [project @ 1997-08-25 22:21:46 by sof] X-Git-Tag: Approximately_1000_patches_recorded~112 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b4ad81c7ef42e09477305eb4cdd0bd37d332733b;p=ghc-hetmet.git [project @ 1997-08-25 22:21:46 by sof] 2.06 uses PackBase --- diff --git a/ghc/compiler/utils/StringBuffer.lhs b/ghc/compiler/utils/StringBuffer.lhs index 12c7190..0647cf3 100644 --- a/ghc/compiler/utils/StringBuffer.lhs +++ b/ghc/compiler/utils/StringBuffer.lhs @@ -332,8 +332,11 @@ lexemeToString (StringBuffer fo _ start_pos# current#) = if start_pos# ==# current# then "" else +#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 205 byteArrayToString (copySubStr (A# fo) (I# start_pos#) (I# (current# -# start_pos#))) - +#else + unpackCStringBA (copySubStr (A# fo) (I# start_pos#) (I# (current# -# start_pos#))) +#endif lexemeToByteArray :: StringBuffer -> _ByteArray Int lexemeToByteArray (StringBuffer fo _ start_pos# current#) =