Tidying, mainly parsers
[advent-of-code-23.git] / advent18 / Main.hs
index 9e5a97c5beadb6c76f1a3f75abc6c4bc1b7697eb..97bcf6d35396769877a2f839c949de90882f2e23 100644 (file)
@@ -79,9 +79,9 @@ direction2P = choice [ U <$ "3"
 instructions2P = instruction2P `sepBy` endOfLine
 
 instruction2P = 
-  instrify <$> (preambleP *> (AT.take 5)) <*> (direction2P <* ")")
+  instrify <$ preambleP <*> AT.take 5 <*> direction2P <* ")"
 
-preambleP = (direction1P *> " " *> decimal <* " (#")
+preambleP = direction1P *> " " *> decimal <* " (#"
 
 instrify :: Text -> Direction -> Instruction
 instrify h d = Instr d (fst $ fromRight (0, "") $ TR.hexadecimal h)