- type Directory u = [Property u]
- data Property u = Prop {
- prop_type :: Type
- prop_parameters :: [Parameter]
- prop_value :: Value u
- data Type = Type {}
- data Parameter = Param {}
- data Value u
- data Rfc2425Types
- type ValueParser u = (Type, [Parameter]) -> ByteString -> [Value u]
- nakedType :: ByteString -> Type
- (@@) :: Property u -> ByteString -> Bool
- parseDirectory :: ValueParser u -> ByteString -> Directory u
- pa_URI :: ValueParser u
- pa_text :: ValueParser u
- pa_date :: ValueParser u
- pa_time :: ValueParser u
- pa_dateTime :: ValueParser u
- pa_integer :: ValueParser u
- pa_bool :: ValueParser u
- pa_float :: ValueParser u
- pa_textList :: ValueParser u
- many :: ValueParser u -> ValueParser u
- printDirectory :: PrintValue u => [Property u] -> ByteString
- printProperty :: PrintValue u => Property u -> ByteString
Documentation
Prop | |
|
data Rfc2425Types Source
Instantiate Value with this phantom type to indicate that property types should be none other than those defined in rfc2425.
Show Rfc2425Types | |
PrintValue Rfc2425Types |
type ValueParser u = (Type, [Parameter]) -> ByteString -> [Value u]Source
The type of parsers for property values, for instance to read an integer property, text property, etc.
nakedType :: ByteString -> TypeSource
Make a property type without any grouping.
(@@) :: Property u -> ByteString -> BoolSource
Check whether the given property is an instance of the given type.
:: ValueParser u | Given a Property Type and a list of parameters, parse a string representation into a Value. |
-> ByteString | |
-> Directory u |
pa_URI :: ValueParser uSource
pa_text :: ValueParser uSource
Unescape slashes, newlines and commas.
pa_date :: ValueParser uSource
pa_time :: ValueParser uSource
pa_bool :: ValueParser uSource
many :: ValueParser u -> ValueParser uSource
Take a parser for single values to a parser for a list of values. This assumes that the separator between values is the , character, and that values do not contain commas themselves.
printDirectory :: PrintValue u => [Property u] -> ByteStringSource
printProperty :: PrintValue u => Property u -> ByteStringSource