From 8d6efb1c1fdddc1fbad167510ce25e56be684130 Mon Sep 17 00:00:00 2001
From: Andreas Grois <andi@grois.info>
Date: Thu, 7 Dec 2023 20:26:51 +0100
Subject: Allow error messages in parsing (for debugging)

And fix an off-by-one in day 5
---
 Common/DayPart.lean | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'Common/DayPart.lean')

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...
-- 
cgit v1.2.3

