2025-12-02 15:19:11 +00:00
|
|
|
module Puzzle where
|
|
|
|
|
|
|
|
|
|
import Data.Text (Text)
|
2025-12-04 21:24:49 +00:00
|
|
|
import Data.Text.Lazy qualified as TL
|
2025-12-02 15:19:11 +00:00
|
|
|
import Data.Void
|
2025-12-04 20:11:16 +00:00
|
|
|
import Test.Tasty
|
2025-12-02 15:19:11 +00:00
|
|
|
import Text.Megaparsec
|
|
|
|
|
|
|
|
|
|
data Puzzle = forall input. Puzzle
|
|
|
|
|
{ number :: Word
|
|
|
|
|
, parser :: Parsec Void Text input
|
2025-12-04 21:24:49 +00:00
|
|
|
, parts :: [input -> TL.Text]
|
2025-12-04 21:16:46 +00:00
|
|
|
, extraTests :: Bool -> FilePath -> IO input -> [TestTree]
|
2025-12-02 15:19:11 +00:00
|
|
|
}
|