Tidying, mainly parsers
[advent-of-code-23.git] / advent19 / Main.hs
index eed9e357c5fc0726c9cdd47db7ce5b7ffca9fd0a..1a05fa56498bc328229fc03f66e95fc979bab8ae 100644 (file)
@@ -217,13 +217,13 @@ partP :: Parser (Part Int)
 rulePartP = (,) <$> (rulesP <* endOfLine <* endOfLine) <*> partsP
 
 rulesP = M.fromList <$> ruleP `sepBy` endOfLine
-ruleP = (,) <$> (nameP <* "{") <*> (ruleBodyP <* "}")
+ruleP = (,) <$> nameP <* "{" <*> ruleBodyP <* "}"
 
 nameP = unpack <$> AT.takeWhile (inClass "a-z") -- many1 letter
 ruleBodyP = ruleElementP `sepBy` ","
 ruleElementP = withTestP <|> withoutTestP
 
-withTestP = WithTest <$> (testP <* ":") <*> destinationP
+withTestP = WithTest <$> testP <* ":" <*> destinationP
 withoutTestP = WithoutTest <$> destinationP
 
 testP = Test <$> registerP <*> comparatorP <*> decimal