harp-0.2.1: HaRP allows pattern-matching with regular expressionsSource codeContentsIndex
Harp.Match
Portabilityportable
Stabilityexperimental
MaintainerNiklas Broberg, d00nibro@dtek.chalmers.se
Description
Functions that simulate the behavior of regular patterns using a Match monad for parsing lists.
Synopsis
data Match e a
runMatch :: Match e a -> [e] -> Maybe a
baseMatch :: (a -> Maybe b) -> Match a (a, b)
manyMatch :: Match e a -> Match e [a]
gManyMatch :: Match e a -> Match e [a]
foldComp :: [[a] -> [a]] -> [a] -> [a]
unzip0 :: [()] -> ()
unzip1 :: [a] -> [a]
unzip2 :: [(a, b)] -> ([a], [b])
(+++) :: Match e a -> Match e a -> Match e a
Documentation
data Match e a Source
The Match monad
show/hide Instances
runMatch :: Match e a -> [e] -> Maybe aSource
baseMatch :: (a -> Maybe b) -> Match a (a, b)Source
manyMatch :: Match e a -> Match e [a]Source
gManyMatch :: Match e a -> Match e [a]Source
foldComp :: [[a] -> [a]] -> [a] -> [a]Source
unzip0 :: [()] -> ()Source
unzip1 :: [a] -> [a]Source
unzip2 :: [(a, b)] -> ([a], [b])Source
(+++) :: Match e a -> Match e a -> Match e aSource
Produced by Haddock version 2.3.0