puzzle-draw-0.1.0.0: Creating graphics for pencil puzzles.

Safe HaskellNone
LanguageHaskell98

Text.Puzzles.Util

Synopsis

Documentation

newtype Alpha Source

Constructors

Alpha 

Fields

unAlpha :: Char
 

data Rect a Source

A rectangle. Each row has length w.

Constructors

Rect !Int !Int [[a]] 

Instances

Functor Rect 
Show a => Show (Rect a) 
FromChar a => FromJSON (Rect a) 

data Border a Source

Constructors

Border [a] [a] [a] [a] 

Instances

Functor Border 
Foldable Border

This instance might be a lie.

Traversable Border 
Show a => Show (Border a) 

data BorderedRect a b Source

Constructors

BorderedRect !Int !Int [[a]] (Border b) 

Instances

(Show a, Show b) => Show (BorderedRect a b) 
(FromChar a, FromChar b) => FromJSON (BorderedRect a b) 

newtype SpacedRect a Source

Constructors

SpacedRect 

Fields

unSpaced :: Rect a
 

Instances

data Space Source

Constructors

Space 

Instances

data Blank Source

Constructors

Blank 

newtype Shaded Source

Constructors

Shaded 

Fields

unShaded :: Bool
 

Instances

parseNodeEdges :: FromChar a => Value -> Parser (SGrid a, [Edge]) Source

Parse a grid of edges with values at the nodes.

E.g. o-*-*-o | | *-o to a grid of masyu pearls and some edges.

data HalfDirs Source

Constructors

HalfDirs 

Fields

unHalfDirs :: [Dir]
 

Instances

partitionEithers :: Ord k => Map k (Either a b) -> (Map k a, Map k b) Source

newtype Tight Source

Constructors

Tight 

Fields

unTight :: Tightfit ()
 

Instances

newtype PMarkedWord Source

Constructors

PMW 

Fields

unPMW :: MarkedWord
 

newtype PCompassC Source

Constructors

PCC 

Fields

unPCC :: CompassC
 

Instances

newtype RefGrid a Source

Constructors

RefGrid 

Fields

unRG :: SGrid a
 

Instances

data Ref Source

Constructors

Ref 

Fields

unRef :: Char
 

Instances

hashmaptomap :: (Eq a, Hashable a, Ord a) => HashMap a b -> Map a b Source

compose :: (Ord a, Ord b) => Map a b -> Map b c -> Maybe (Map a c) Source