summaryrefslogtreecommitdiff
path: root/Common
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2023-12-07 20:26:51 +0100
committerAndreas Grois <andi@grois.info>2023-12-07 20:26:51 +0100
commit8d6efb1c1fdddc1fbad167510ce25e56be684130 (patch)
treef35cf0d4943ccb397f3d0a91ad8a1cb1116eccdd /Common
parent9fb83b22220c825943549bc97bdab457bfad7f5b (diff)
Allow error messages in parsing (for debugging)
And fix an off-by-one in day 5
Diffstat (limited to 'Common')
-rw-r--r--Common/DayPart.lean2
1 files changed, 1 insertions, 1 deletions
diff --git a/Common/DayPart.lean b/Common/DayPart.lean
index c6a4d44..a701272 100644
--- a/Common/DayPart.lean
+++ b/Common/DayPart.lean
@@ -6,7 +6,7 @@ inductive Parts
| Two
class Parse (day : Days) {ι : outParam Type} where
- parse : String → Option ι
+ parse : String → Except String ι
class Part (day : Days) (part : Parts) {ι ρ : outParam Type} [Parse day (ι := ι)] [ToString ρ] where
run : ι → Option ρ -- can fail, because it deals with user input...