aboutsummaryrefslogtreecommitdiff
path: root/2020
diff options
context:
space:
mode:
authorJulien Dessaux2023-03-19 14:49:16 +0100
committerJulien Dessaux2023-03-19 14:49:16 +0100
commit6bb7ccb654b6990bb78b9aca80308f64017ddabe (patch)
treebc52797c27c0730688b5d40a2f6f581808fd3435 /2020
parent2020-09 in haskell (diff)
downloadadvent-of-code-6bb7ccb654b6990bb78b9aca80308f64017ddabe.tar.gz
advent-of-code-6bb7ccb654b6990bb78b9aca80308f64017ddabe.tar.bz2
advent-of-code-6bb7ccb654b6990bb78b9aca80308f64017ddabe.zip
small style fixes
Diffstat (limited to '')
-rw-r--r--2020/05-Binary_Boarding/first.hs2
-rw-r--r--2020/05-Binary_Boarding/second.hs2
-rw-r--r--2020/07-Handy_Haversacks/second.hs2
3 files changed, 3 insertions, 3 deletions
diff --git a/2020/05-Binary_Boarding/first.hs b/2020/05-Binary_Boarding/first.hs
index 2f3ad7b..42fb9f0 100644
--- a/2020/05-Binary_Boarding/first.hs
+++ b/2020/05-Binary_Boarding/first.hs
@@ -34,7 +34,7 @@ parseBP = do
return $ BoardingPass { row=row, column=column }
parseBPs :: Parser [BoardingPass]
-parseBPs = some (parseBP) <* eof
+parseBPs = some parseBP <* eof
parseInput :: String -> IO [BoardingPass]
parseInput filename = do
diff --git a/2020/05-Binary_Boarding/second.hs b/2020/05-Binary_Boarding/second.hs
index 9f85b7e..fca6873 100644
--- a/2020/05-Binary_Boarding/second.hs
+++ b/2020/05-Binary_Boarding/second.hs
@@ -30,7 +30,7 @@ parseBP = do
return $ row * 8 + column
parseBPs :: Parser [BoardingPass]
-parseBPs = some (parseBP) <* eof
+parseBPs = some parseBP <* eof
parseInput :: String -> IO [BoardingPass]
parseInput filename = do
diff --git a/2020/07-Handy_Haversacks/second.hs b/2020/07-Handy_Haversacks/second.hs
index 3d8dcda..7446137 100644
--- a/2020/07-Handy_Haversacks/second.hs
+++ b/2020/07-Handy_Haversacks/second.hs
@@ -75,6 +75,6 @@ main = do
when (exampleOutput /= exampleExpectedOutput) (die $ "example failed: got " ++ show exampleOutput ++ " instead of " ++ show exampleExpectedOutput)
example2 <- parseInput "example2"
let exampleOutput2 = compute example2
- when (exampleOutput2 /= exampleExpectedOutput2) (die $ "example2 failed: got " ++ show exampleOutput ++ " instead of " ++ show exampleExpectedOutput)
+ when (exampleOutput2 /= exampleExpectedOutput2) (die $ "example2 failed: got " ++ show exampleOutput2 ++ " instead of " ++ show exampleExpectedOutput2)
input <- parseInput "input"
print $ compute input