MSU.Match
data Match a Source #
Constructors
Always matches
Matches if equal
Matches if element
Defined in MSU.Match
Methods
toJSON :: Match a -> Value #
toEncoding :: Match a -> Encoding #
toJSONList :: [Match a] -> Value #
toEncodingList :: [Match a] -> Encoding #
parseJSON :: Value -> Parser (Match a) #
parseJSONList :: Value -> Parser [Match a] #
matches :: Eq a => Maybe (Match a) -> a -> Bool Source #
Apply a Match to get Bool
Match
Bool
Accepts Maybe purefuly for convenience of current use (where matches are optional keys in JSON).
Maybe
matchesMaybe :: Eq a => Maybe (Match a) -> Maybe a -> Bool Source #
Apply a Match to a Maybe to get Bool
A Nothing always matches.
Nothing