cleanup
[minfp.git] / parse.icl
index 99f0246..6a9ab29 100644 (file)
--- a/parse.icl
+++ b/parse.icl
@@ -9,7 +9,7 @@ import Data.GenEq
 import Data.Functor
 import Data.Func
 import Data.List
-import Data.Tuple
+import Text.GenPrint
 import StdEnv
 
 import ast
@@ -19,6 +19,8 @@ import ast
 
 :: Token = TTEq | TTSemiColon | TTLambda | TTDot | TTBrackOpen | TTBrackClose | TTBool Bool | TTInt Int | TTOp [Char] | TTIdent [Char]
 derive gEq Token
+instance toString Token where toString t = printToString t
+derive gPrint Token
 lex :: [Char] -> Either [String] [Token]
 lex [] = pure []
 lex [';':ts] = TTSemiColon <:> lex ts
@@ -88,7 +90,7 @@ where
 
        pFunction :: Parser ([Char], [[Char]], [Token])
        pFunction
-               =   tuple3
+               =   (\x y z->(x, y, z))
                <$> (pFunId <|> pId)
                <*> many pId
                <*  pToken TTEq