X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=advent12%2FMainBruteForce.hs;h=7d11334d9c38ea378d8ffb4589ea7b2f7dd5b48b;hb=ac1cb7b87194225d518bae8e5a9d9efe7d27220a;hp=6b8620395a377b30138beae95080ccfa3895606d;hpb=3af07db033456d04a8c0f307b20fc6ca0ffcba9e;p=advent-of-code-23.git diff --git a/advent12/MainBruteForce.hs b/advent12/MainBruteForce.hs index 6b86203..7d11334 100644 --- a/advent12/MainBruteForce.hs +++ b/advent12/MainBruteForce.hs @@ -78,7 +78,7 @@ recordP :: Parser Record springP :: Parser Spring recordsP = recordP `sepBy` endOfLine -recordP = Record <$> (many1 springP <* " ") <*> (decimal `sepBy` ",") +recordP = Record <$> many1 springP <* " " <*> decimal `sepBy` "," springP = (Unknown <$ "?") <|> (Damaged <$ "#") <|> (Operational <$ ".") successfulParse :: Text -> [Record]