composite-xml-0.1.0.0: RecXML Type
Safe HaskellNone
LanguageHaskell2010

Composite.XML

Documentation

data RecXML :: Symbol -> [Type] -> [Type] -> Type where Source #

Constructors

RNode :: Rec Maybe xs -> [Field ys] -> RecXML s xs ys 

Instances

Instances details
(Eq (Field ys), Eq (Rec Maybe xs), RecApplicative ys) => Eq (RecXML s xs ys) Source # 
Instance details

Defined in Composite.XML

Methods

(==) :: RecXML s xs ys -> RecXML s xs ys -> Bool #

(/=) :: RecXML s xs ys -> RecXML s xs ys -> Bool #

(Show (Field ys), Show (Rec Maybe xs), RecApplicative ys) => Show (RecXML s xs ys) Source # 
Instance details

Defined in Composite.XML

Methods

showsPrec :: Int -> RecXML s xs ys -> ShowS #

show :: RecXML s xs ys -> String #

showList :: [RecXML s xs ys] -> ShowS #

(KnownSymbol s, FromAttrs (Rec Maybe xs), FromElement (CoRec Identity ys)) => FromElement (RecXML s xs ys) Source # 
Instance details

Defined in Composite.XML

Methods

fromElement :: Element -> Maybe (RecXML s xs ys) Source #

(KnownSymbol s, ToAttrs (Rec Maybe xs), RecApplicative ys, AllHave '[ToElement] ys) => ToElement (RecXML s xs ys) Source # 
Instance details

Defined in Composite.XML

Methods

toElement :: RecXML s xs ys -> Element Source #

class ToAttr a where Source #

Methods

toAttr :: a -> (Name, Text) Source #

Instances

Instances details
(Formattable a, KnownSymbol s) => ToAttr (s :-> a) Source # 
Instance details

Defined in Composite.XML

Methods

toAttr :: (s :-> a) -> (Name, Text) Source #

class ToAttrs x where Source #

Methods

toAttrs :: x -> Map Name Text Source #

Instances

Instances details
(ToAttr x, ToAttrs (Record xs)) => ToAttrs (Record (x ': xs)) Source # 
Instance details

Defined in Composite.XML

Methods

toAttrs :: Record (x ': xs) -> Map Name Text Source #

(ToAttr x, ToAttrs (Rec Maybe xs)) => ToAttrs (Rec Maybe (x ': xs)) Source # 
Instance details

Defined in Composite.XML

Methods

toAttrs :: Rec Maybe (x ': xs) -> Map Name Text Source #

ToAttrs (Rec f ('[] :: [u])) Source # 
Instance details

Defined in Composite.XML

Methods

toAttrs :: Rec f '[] -> Map Name Text Source #

class FromAttr s a | a -> s where Source #

Methods

fromAttr :: (Name, Text) -> Maybe a Source #

Instances

Instances details
(Readable a, KnownSymbol s) => FromAttr s (s :-> a) Source # 
Instance details

Defined in Composite.XML

Methods

fromAttr :: (Name, Text) -> Maybe (s :-> a) Source #

class FromAttrs a where Source #

Methods

fromAttrs :: [(Name, Text)] -> Maybe a Source #

Instances

Instances details
(FromAttr s (s :-> x), FromAttrs (Record xs)) => FromAttrs (Record ((s :-> x) ': xs)) Source # 
Instance details

Defined in Composite.XML

Methods

fromAttrs :: [(Name, Text)] -> Maybe (Record ((s :-> x) ': xs)) Source #

(FromAttr s (s :-> x), FromAttrs (Rec Maybe xs)) => FromAttrs (Rec Maybe ((s :-> x) ': xs)) Source # 
Instance details

Defined in Composite.XML

Methods

fromAttrs :: [(Name, Text)] -> Maybe (Rec Maybe ((s :-> x) ': xs)) Source #

FromAttrs (Rec f ('[] :: [u])) Source # 
Instance details

Defined in Composite.XML

Methods

fromAttrs :: [(Name, Text)] -> Maybe (Rec f '[]) Source #

class Formattable x where Source #

Methods

formatC :: x -> Text Source #

Instances

Instances details
Formattable Bool Source # 
Instance details

Defined in Composite.XML

Methods

formatC :: Bool -> Text Source #

Formattable Double Source # 
Instance details

Defined in Composite.XML

Methods

formatC :: Double -> Text Source #

Formattable Int Source # 
Instance details

Defined in Composite.XML

Methods

formatC :: Int -> Text Source #

Formattable () Source # 
Instance details

Defined in Composite.XML

Methods

formatC :: () -> Text Source #

Formattable Text Source # 
Instance details

Defined in Composite.XML

Methods

formatC :: Text -> Text Source #

Formattable String Source # 
Instance details

Defined in Composite.XML

Methods

formatC :: String -> Text Source #

Formattable (Ratio Integer) Source # 
Instance details

Defined in Composite.XML

class Readable x where Source #

Methods

readC :: Text -> Maybe x Source #

Instances

Instances details
Readable Bool Source # 
Instance details

Defined in Composite.XML

Methods

readC :: Text -> Maybe Bool Source #

Readable Double Source # 
Instance details

Defined in Composite.XML

Methods

readC :: Text -> Maybe Double Source #

Readable Int Source # 
Instance details

Defined in Composite.XML

Methods

readC :: Text -> Maybe Int Source #

Readable Text Source # 
Instance details

Defined in Composite.XML

Methods

readC :: Text -> Maybe Text Source #

Readable String Source # 
Instance details

Defined in Composite.XML

Methods

readC :: Text -> Maybe String Source #

class ToElement a where Source #

Methods

toElement :: a -> Element Source #

Instances

Instances details
(AllHave '[ToElement] ys, RecApplicative ys) => ToElement (CoRec Identity ys) Source # 
Instance details

Defined in Composite.XML

(KnownSymbol s, ToAttrs (Rec Maybe xs), RecApplicative ys, AllHave '[ToElement] ys) => ToElement (RecXML s xs ys) Source # 
Instance details

Defined in Composite.XML

Methods

toElement :: RecXML s xs ys -> Element Source #

class ToElements x where Source #

Methods

toElements :: x -> [Element] Source #

Instances

Instances details
ToElement a => ToElements [a] Source # 
Instance details

Defined in Composite.XML

Methods

toElements :: [a] -> [Element] Source #

(ToElement x, ToElements (Record xs)) => ToElements (Record (x ': xs)) Source # 
Instance details

Defined in Composite.XML

Methods

toElements :: Record (x ': xs) -> [Element] Source #

ToElements (Rec f ('[] :: [u])) Source # 
Instance details

Defined in Composite.XML

Methods

toElements :: Rec f '[] -> [Element] Source #

class FromElement a where Source #

Instances

Instances details
(AllHave '[FromElement] ys, RecApplicative ys, FoldRec ys ys, RMap ys) => FromElement (CoRec Identity ys) Source # 
Instance details

Defined in Composite.XML

(KnownSymbol s, FromAttrs (Rec Maybe xs), FromElement (CoRec Identity ys)) => FromElement (RecXML s xs ys) Source # 
Instance details

Defined in Composite.XML

Methods

fromElement :: Element -> Maybe (RecXML s xs ys) Source #

class FromElements x where Source #

Methods

fromElements :: [Element] -> Maybe x Source #

Instances

Instances details
FromElement a => FromElements [a] Source # 
Instance details

Defined in Composite.XML

Methods

fromElements :: [Element] -> Maybe [a] Source #

(FromElement x, FromElements (Record xs)) => FromElements (Record (x ': xs)) Source # 
Instance details

Defined in Composite.XML

Methods

fromElements :: [Element] -> Maybe (Record (x ': xs)) Source #

FromElements (Record ('[] :: [Type])) Source # 
Instance details

Defined in Composite.XML

Methods

fromElements :: [Element] -> Maybe (Record '[]) Source #