X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FStringBuffer.lhs;h=0647cf35feddc24f90b2e40ddfe28c4967d5bb6a;hb=b4ad81c7ef42e09477305eb4cdd0bd37d332733b;hp=12c719057970f6e7f390649b8a7173020c16b5dd;hpb=c8d5e66d436d8370fd0de84c8ff901c930d0e1ce;p=ghc-hetmet.git 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#) =