garnet/haskell/Puzzle.hs
George Thomas be0a6510d8 Use lazy text for test outputs
Simplifies encoding code slightly, and potentially saves a lot of time for failing tests. Plus we've always been using `T.show` in practice anyway, so it's an easy change to make.
2025-12-04 21:24:49 +00:00

15 lines
340 B
Haskell

module Puzzle where
import Data.Text (Text)
import Data.Text.Lazy qualified as TL
import Data.Void
import Test.Tasty
import Text.Megaparsec
data Puzzle = forall input. Puzzle
{ number :: Word
, parser :: Parsec Void Text input
, parts :: [input -> TL.Text]
, extraTests :: Bool -> FilePath -> IO input -> [TestTree]
}