projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 1997-08-25 22:21:46 by sof]
[ghc-hetmet.git]
/
ghc
/
compiler
/
utils
/
StringBuffer.lhs
diff --git
a/ghc/compiler/utils/StringBuffer.lhs
b/ghc/compiler/utils/StringBuffer.lhs
index
12c7190
..
0647cf3
100644
(file)
--- 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 start_pos# ==# current# then
""
else
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 205
byteArrayToString (copySubStr (A# fo) (I# start_pos#) (I# (current# -# start_pos#)))
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#) =
lexemeToByteArray :: StringBuffer -> _ByteArray Int
lexemeToByteArray (StringBuffer fo _ start_pos# current#) =