Safe Haskell | None |
---|---|
Language | Haskell98 |
Helpers to string together parser and renderer by puzzle type.
Synopsis
- type PuzzleHandler b a = forall p q. ParsePuzzle p q -> Drawers b p q -> a
- handle :: Backend' b => PuzzleHandler b a -> PuzzleType -> a
- drawPuzzleMaybeSol :: PuzzleHandler b ((Value, Maybe Value) -> Parser (Diagram b, Maybe (Diagram b)))
Documentation
type PuzzleHandler b a = forall p q. ParsePuzzle p q -> Drawers b p q -> a Source #
A function to compose an arbitrary matching pair of parser and renderer.
In PuzzleHandler b a
, b
is the rendering backend type, while a
is
the result type of the composition.
handle :: Backend' b => PuzzleHandler b a -> PuzzleType -> a Source #
handle h t
composes the parser and renderer for the puzzle
type t
with the handler h
.