Files
aoc2025/lib/AoC.hs
Amneesh Singh ca13039cd3 day 1: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-12-02 01:47:48 +05:30

9 lines
210 B
Haskell

module AoC where
import Text.Parsec (ParseError)
-- extract Right value after parsing
extract :: Either ParseError a -> a
extract (Left err) = error ("Parsing failed: " ++ show err)
extract (Right val) = val