Download Curry: An Integrated Functional Logic Language
Transcript
eBool :: String → String → XmlConv Repeatable Elem Bool Creates an XML converter for boolean elements. Boolean elements may be used in repetitions. eEmpty :: String → a → XmlConv Repeatable Elem a Takes a name and a value and creates an empty XML element that represents the given value. The created element may be used in repetitions. eOpt :: String → XmlConv a b c → XmlConv Repeatable Elem (Maybe c) Creates an XML converter that represents an element containing optional XML data. The created element may be used in repetitions. eRep :: String → XmlConv Repeatable a b → XmlConv Repeatable Elem [b] Creates an XML converter that represents an element containing repeated XML data. The created element may be used in repetitions. seq1 :: (a → b) → XmlConv c d a → XmlConv c NoElem b Creates an XML converter representing a sequence of arbitrary XML data. The sequence must not be used in repetitions and does not represent an XML element. repSeq1 :: (a → b) → XmlConv Repeatable c a → XmlConv NotRepeatable NoElem [b] Creates an XML converter that represents a repetition of a sequence of repeatable XML data. The repetition may be used in other repetitions but does not represent an XML element. This combinator is provided because converters for repeatable sequences cannot be constructed by the seq combinators. eSeq1 :: String → (a → b) → XmlConv c d a → XmlConv Repeatable Elem b Creates an XML converter for compound values represented as an XML element with children that correspond to the values components. The element can be used in repetitions. eRepSeq1 :: String → (a → b) → XmlConv Repeatable c a → XmlConv Repeatable Elem [b] Creates an XML converter for repetitions of sequences represented as an XML element that can be used in repetitions. seq2 :: (a → b → c) → XmlConv d e a → XmlConv f g b → XmlConv NotRepeatable NoElem c Creates an XML converter representing a sequence of arbitrary XML data. The sequence must not be used in repetitions and does not represent an XML element. repSeq2 :: (a → b → c) → XmlConv Repeatable d a → XmlConv Repeatable e b → XmlConv NotRepeatable NoElem [c] 139