.
[cc1516.git] / lex.icl
diff --git a/lex.icl b/lex.icl
index ce642a1..aa34987 100644 (file)
--- a/lex.icl
+++ b/lex.icl
@@ -7,9 +7,10 @@ import StdBool
 import StdList
 import StdChar
 import StdString
+import StdTuple
 
 import yard
-from AST import :: Pos(..)
+import AST
 
 :: LexItem
        = LexToken Int TokenValue
@@ -19,9 +20,7 @@ from AST import :: Pos(..)
        | LexItemError String
 
 lexer :: [Char] -> LexerOutput
-lexer r = case runParser (lexProgram 1 1) r of
-       (Right p, _) = Right p
-       (Left e, _) = Left e
+lexer r = fst $ runParser (lexProgram 1 1) r
 
 lexProgram :: Int Int -> Parser Char [Token]
 lexProgram line column = lexToken >>= \t->case t of