PARSER: improve style

This commit is contained in:
hasufell 2014-10-09 16:59:09 +02:00
parent 70665e4b29
commit 9c724ec479
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 5 additions and 5 deletions

View File

@ -69,12 +69,12 @@ posInt = MkParser f
-- |Creates a Parser that accepts positive integers. -- |Creates a Parser that accepts positive integers.
posDouble :: Parser Double posDouble :: Parser Double
posDouble = read <$> ( posDouble = (read <$>) $
(\x y z -> x ++ [y] ++ z) <$> (\x y z -> x ++ [y] ++ z) <$>
(MkParser f) <*> MkParser f <*>
(char '.') <*> char '.' <*>
(MkParser f) <|> MkParser f <|>
(MkParser f)) MkParser f
where where
f xs f xs
| null ns = Nothing | null ns = Nothing