summaryrefslogtreecommitdiff
path: root/ghc/lib/std
diff options
context:
space:
mode:
authorsof <unknown>1999-01-15 10:21:43 +0000
committersof <unknown>1999-01-15 10:21:43 +0000
commitdc0dba41e5eade93cd64154a4bc26dff602519bc (patch)
tree6293c5c7d96f4759f59e809a10553577519e3376 /ghc/lib/std
parent0fffbea841d9647388a7b845808a9757782da663 (diff)
downloadhaskell-dc0dba41e5eade93cd64154a4bc26dff602519bc.tar.gz
[project @ 1999-01-15 10:21:43 by sof]
lexLitChar: '\DEL' wasn't being lexed properly
Diffstat (limited to 'ghc/lib/std')
-rw-r--r--ghc/lib/std/PrelRead.lhs8
1 files changed, 5 insertions, 3 deletions
diff --git a/ghc/lib/std/PrelRead.lhs b/ghc/lib/std/PrelRead.lhs
index a4e394b839..1ef7b43d3c 100644
--- a/ghc/lib/std/PrelRead.lhs
+++ b/ghc/lib/std/PrelRead.lhs
@@ -246,11 +246,13 @@ lexLitChar ('\\':s) = do
lexEsc _ = mzero
fromAsciiLab (x:y:z:ls) | isUpper y && (isUpper z || isDigit z) &&
- [x,y,z] `elem` asciiTab = return ([x,y,z], ls)
+ [x,y,z] `elem` asciiEscTab = return ([x,y,z], ls)
fromAsciiLab (x:y:ls) | isUpper y &&
- [x,y] `elem` asciiTab = return ([x,y], ls)
- fromAsciiLab _ = mzero
+ [x,y] `elem` asciiEscTab = return ([x,y], ls)
+ fromAsciiLab _ = mzero
+ asciiEscTab = "DEL" : asciiTab
+
lexLitChar (c:s) = return ([c],s)
lexLitChar "" = mzero