[project @ 1997-08-25 22:21:46 by sof]
[ghc-hetmet.git] / ghc / compiler / utils / StringBuffer.lhs
index 12c7190..0647cf3 100644 (file)
@@ -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#) =