summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-12-14 19:23:17 +0000
committerIan Lynagh <ian@well-typed.com>2012-12-14 19:23:17 +0000
commit6409ba527bfd7c7b536d0c523c5f99186cd258db (patch)
tree9661d5f98e13631a4d03cd0c2ea0d7a3afc68fe5 /compiler/parser
parentca56668af97f534b3cff8717fc35d795a0bcb47d (diff)
downloadhaskell-6409ba527bfd7c7b536d0c523c5f99186cd258db.tar.gz
Rename remaining FastBytes usages to ByteString
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/Lexer.x7
-rw-r--r--compiler/parser/ParserCore.y2
2 files changed, 5 insertions, 4 deletions
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index 3ffa7db7f7..2746faa34e 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -77,6 +77,7 @@ import Util ( readRational )
import Control.Monad
import Data.Bits
+import Data.ByteString (ByteString)
import Data.Char
import Data.List
import Data.Maybe
@@ -552,7 +553,7 @@ data Token
| ITrational FractionalLit
| ITprimchar Char
- | ITprimstring FastBytes
+ | ITprimstring ByteString
| ITprimint Integer
| ITprimword Integer
| ITprimfloat FractionalLit
@@ -1244,8 +1245,8 @@ lex_string s = do
setInput i
if any (> '\xFF') s
then failMsgP "primitive string literal must contain only characters <= \'\\xFF\'"
- else let fb = unsafeMkFastBytesString (reverse s)
- in return (ITprimstring fb)
+ else let bs = unsafeMkByteString (reverse s)
+ in return (ITprimstring bs)
_other ->
return (ITstring (mkFastString (reverse s)))
else
diff --git a/compiler/parser/ParserCore.y b/compiler/parser/ParserCore.y
index 7f9a49a2b7..fbcc98346b 100644
--- a/compiler/parser/ParserCore.y
+++ b/compiler/parser/ParserCore.y
@@ -303,7 +303,7 @@ lit :: { Literal }
: '(' INTEGER '::' aty ')' { convIntLit $2 $4 }
| '(' RATIONAL '::' aty ')' { convRatLit $2 $4 }
| '(' CHAR '::' aty ')' { MachChar $2 }
- | '(' STRING '::' aty ')' { MachStr (fastStringToFastBytes (mkFastString $2)) }
+ | '(' STRING '::' aty ')' { MachStr (fastStringToByteString (mkFastString $2)) }
fs_var_occ :: { FastString }
: NAME { mkFastString $1 }