tokEq x y = gEq {|*|} x y
parseSepList :: TokenValue (Parser Token a) -> Parser Token [a]
-parseSepList sep p =
- (liftM2 (\es->(\e->reverse [e:es])) (some (p <* satTok sep)) p) <|>
- (liftM pure p) <|> pure empty
+parseSepList sep p =
+ (p <* satTok sep >>= \v1-> parseSepList sep p >>= \vs -> pure [v1:vs])
+ <|> (p >>= \v-> pure [v])
+ <|> pure []
parseIdent :: Parser Token String
parseIdent = trans2 (IdentToken "") (\(IdentToken e)->toString e)