add \case sugar and editor support. fix symlink
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
aoc2024/day20/eg.txt
|
||||
base 84
|
||||
part1 1
|
||||
part2 285
|
||||
aoc2024/day20/input.txt
|
||||
base 9440
|
||||
part1 1332
|
||||
part2 987695
|
||||
@@ -30,12 +30,12 @@ fail msg = \ cs => Left msg
|
||||
|
||||
-- TODO, case builder isn't expanding Parser Unit to count lambdas
|
||||
eof : Parser Unit
|
||||
eof = \ cs => case cs of
|
||||
eof = \case
|
||||
Nil => Right (MkUnit, Nil)
|
||||
_ => Left "expected eof"
|
||||
|
||||
satisfy : (Char → Bool) → Parser Char
|
||||
satisfy pred = λ cs => case cs of
|
||||
satisfy pred = \case
|
||||
Nil => Left "unexpected EOF"
|
||||
(c :: cs) => if pred c then Right (c, cs) else Left ("did not expect " ++ show c)
|
||||
|
||||
|
||||
1
aoc2024/SortedMap.newt
Symbolic link
1
aoc2024/SortedMap.newt
Symbolic link
@@ -0,0 +1 @@
|
||||
../newt/SortedMap.newt
|
||||
Reference in New Issue
Block a user