Change Show for List to include brackets
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
aoc2024/day21/eg.txt
|
aoc2024/day21/eg.txt
|
||||||
(0, (3, 1)), (1, (2, 0)), (2, (2, 1)), (3, (2, 2)), (4, (1, 0)), (5, (1, 1)), (6, (1, 2)), (7, (0, 0)), (8, (0, 1)), (9, (0, 2)), (A, (3, 2))
|
[(0, (3, 1)), (1, (2, 0)), (2, (2, 1)), (3, (2, 2)), (4, (1, 0)), (5, (1, 1)), (6, (1, 2)), (7, (0, 0)), (8, (0, 1)), (9, (0, 2)), (A, (3, 2))]
|
||||||
part1 126384
|
part1 126384
|
||||||
part2 154115708116294
|
part2 154115708116294
|
||||||
aoc2024/day21/input.txt
|
aoc2024/day21/input.txt
|
||||||
(0, (3, 1)), (1, (2, 0)), (2, (2, 1)), (3, (2, 2)), (4, (1, 0)), (5, (1, 1)), (6, (1, 2)), (7, (0, 0)), (8, (0, 1)), (9, (0, 2)), (A, (3, 2))
|
[(0, (3, 1)), (1, (2, 0)), (2, (2, 1)), (3, (2, 2)), (4, (1, 0)), (5, (1, 1)), (6, (1, 2)), (7, (0, 0)), (8, (0, 1)), (9, (0, 2)), (A, (3, 2))]
|
||||||
part1 248108
|
part1 248108
|
||||||
part2 303836969158972
|
part2 303836969158972
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
aoc2024/day21/eg.txt
|
aoc2024/day21/eg.txt
|
||||||
(0, (3, 1)), (1, (2, 0)), (2, (2, 1)), (3, (2, 2)), (4, (1, 0)), (5, (1, 1)), (6, (1, 2)), (7, (0, 0)), (8, (0, 1)), (9, (0, 2)), (A, (3, 2))
|
[(0, (3, 1)), (1, (2, 0)), (2, (2, 1)), (3, (2, 2)), (4, (1, 0)), (5, (1, 1)), (6, (1, 2)), (7, (0, 0)), (8, (0, 1)), (9, (0, 2)), (A, (3, 2))]
|
||||||
part1 126384
|
part1 126384
|
||||||
part2 154115708116294
|
part2 154115708116294
|
||||||
aoc2024/day21/input.txt
|
aoc2024/day21/input.txt
|
||||||
(0, (3, 1)), (1, (2, 0)), (2, (2, 1)), (3, (2, 2)), (4, (1, 0)), (5, (1, 1)), (6, (1, 2)), (7, (0, 0)), (8, (0, 1)), (9, (0, 2)), (A, (3, 2))
|
[(0, (3, 1)), (1, (2, 0)), (2, (2, 1)), (3, (2, 2)), (4, (1, 0)), (5, (1, 1)), (6, (1, 2)), (7, (0, 0)), (8, (0, 1)), (9, (0, 2)), (A, (3, 2))]
|
||||||
part1 248108
|
part1 248108
|
||||||
part2 303836969158972
|
part2 303836969158972
|
||||||
|
|||||||
@@ -828,7 +828,7 @@ instance ∀ a b. {{Show a}} {{Show b}} → Show (a × b) where
|
|||||||
show (a,b) = "(" ++ show a ++ ", " ++ show b ++ ")"
|
show (a,b) = "(" ++ show a ++ ", " ++ show b ++ ")"
|
||||||
|
|
||||||
instance ∀ a. {{Show a}} → Show (List a) where
|
instance ∀ a. {{Show a}} → Show (List a) where
|
||||||
show xs = joinBy ", " $ map show xs
|
show xs = "[" ++ (joinBy ", " $ map show xs) ++ "]"
|
||||||
|
|
||||||
-- For now, I'm not having the compiler do this automatically
|
-- For now, I'm not having the compiler do this automatically
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
*** Process tests/Possible.newt
|
*** Process tests/Possible.newt
|
||||||
module Prelude
|
module Prelude
|
||||||
module Possible
|
module Possible
|
||||||
ERROR at tests/Possible.newt:6:5--6:8: possible constructors: Prelude.Z, Prelude.S
|
ERROR at tests/Possible.newt:6:5--6:8: possible constructors: [Prelude.Z, Prelude.S]
|
||||||
|
|
||||||
foo : Nat → Nat
|
foo : Nat → Nat
|
||||||
foo ()
|
foo ()
|
||||||
|
|||||||
Reference in New Issue
Block a user