Safe Haskell | None |
---|---|
Language | Haskell98 |
- class FromChar a where
- class FromString a where
- parseString :: String -> Parser a
- newtype Alpha = Alpha {}
- data Rect a = Rect !Int !Int [[a]]
- data Border a = Border [a] [a] [a] [a]
- data BorderedRect a b = BorderedRect !Int !Int [[a]] (Border b)
- newtype SpacedRect a = SpacedRect {}
- data Space = Space
- data Blank = Blank
- listListToMap :: [[a]] -> Map (Cell Square) a
- rectToSGrid :: Rect a -> SGrid a
- rectToClueGrid :: Rect (Either Blank a) -> SGrid (Clue a)
- newtype Shaded = Shaded {}
- parseShadedGrid :: Value -> Parser (SGrid Bool)
- parseGrid :: FromChar a => Value -> Parser (SGrid a)
- parseClueGrid :: FromChar a => Value -> Parser (SGrid (Clue a))
- parseSpacedClueGrid :: FromString a => Value -> Parser (SGrid (Clue a))
- parsePlainEdges :: Value -> Parser [Edge]
- readEdges :: SGrid Char -> [Edge]
- parseGridChars :: FromChar a => SGrid Char -> Parser (SGrid a)
- parseNodeEdges :: FromChar a => Value -> Parser (SGrid a, [Edge])
- data HalfDirs = HalfDirs {
- unHalfDirs :: [Dir]
- parseEdges :: Value -> Parser [Edge]
- type ThermoRect = Rect (Either Blank (Either Int Alpha))
- partitionEithers :: Ord k => Map k (Either a b) -> (Map k a, Map k b)
- parseThermos :: SGrid Alpha -> Parser [Thermometer]
- parseThermoGrid :: ThermoRect -> Parser (SGrid Int, [Thermometer])
- newtype Tight = Tight {}
- parseTightOutside :: Value -> Parser (OutsideClues (Maybe Int), SGrid (Tightfit ()))
- parseTightIntGrid :: Value -> Parser (SGrid (Tightfit Int))
- newtype PMarkedWord = PMW {
- unPMW :: MarkedWord
- parseNWords :: Int -> String -> Parser [String]
- newtype PCompassC = PCC {}
- newtype RefGrid a = RefGrid {}
- data Ref = Ref {}
- hashmaptomap :: (Eq a, Hashable a, Ord a) => HashMap a b -> Map a b
- compose :: (Ord a, Ord b) => Map a b -> Map b c -> Maybe (Map a c)
- parseAfternoonGrid :: Value -> Parser (SGrid Shade)
Documentation
class FromString a where Source
parseString :: String -> Parser a Source
FromString Int | |
FromString Blank | |
FromChar a => FromString (Tightfit a) | |
(FromString a, FromString b) => FromString (Either a b) |
A rectangle. Each row has length w
.
Border [a] [a] [a] [a] |
data BorderedRect a b Source
BorderedRect !Int !Int [[a]] (Border b) |
(Show a, Show b) => Show (BorderedRect a b) | |
(FromChar a, FromChar b) => FromJSON (BorderedRect a b) |
listListToMap :: [[a]] -> Map (Cell Square) a Source
rectToSGrid :: Rect a -> SGrid a Source
parseSpacedClueGrid :: FromString a => Value -> Parser (SGrid (Clue a)) Source
parsePlainEdges :: Value -> Parser [Edge] Source
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.
parseEdges :: Value -> Parser [Edge] Source
parseThermos :: SGrid Alpha -> Parser [Thermometer] Source
parseThermoGrid :: ThermoRect -> Parser (SGrid Int, [Thermometer]) Source
parseTightOutside :: Value -> Parser (OutsideClues (Maybe Int), SGrid (Tightfit ())) Source