@@ -14,7 +14,6 @@ import SourceSyntax.PrettyPrint
14import SourceSyntax.Declaration (Assoc)
14import SourceSyntax.Declaration (Assoc)
15import Text.Parsec hiding (newline,spaces,State)
15import Text.Parsec hiding (newline,spaces,State)
16import Text.Parsec.Indent
16import Text.Parsec.Indent
17−import Text.Read (readMaybe)
19reserveds = [ "if", "then", "else"
18reserveds = [ "if", "then", "else"
20 , "case", "of"
19 , "case", "of"
@@ -50,6 +49,12 @@ iParseWithTable :: SourceName -> OpTable -> IParser a -> String -> Either ParseE
50iParseWithTable sourceName table aParser input =
49iParseWithTable sourceName table aParser input =
51 runIndent sourceName $ runParserT aParser table sourceName input
50 runIndent sourceName $ runParserT aParser table sourceName input
52+readMaybe :: Read a => String -> Maybe a
54+ case [ x | (x,t) <- reads s, ("","") <- lex t ] of
53backslashed :: IParser Char
58backslashed :: IParser Char
54backslashed = do
59backslashed = do