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.
15 lines
340 B
Haskell
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]
|
|
}
|