ondim-0.1.0.0
Safe HaskellNone
LanguageGHC2021

Ondim.Advanced

Description

This module is for advanced users. Generally speaking, you should only use this module if you want to define new targets (formats) or customize existing ones.

Documentation

class (Typeable t, Expansible t) => OndimNode t where Source #

Minimal complete definition

Nothing

Methods

identify :: t -> Maybe Text Source #

Returns the name of the node as defined by the OndimNode instance.

attributes :: t -> Ondim s [Attribute] Source #

Returns a list of attributes of the node as defined by the OndimNode instance.

children :: t -> [t] Source #

Returns the children of the node as defined by the OndimNode instance.

castFrom :: OndimNode a => Maybe (a -> [t]) Source #

renderNode :: Maybe (t -> LByteString) Source #

Converts the node to a LByteString as defined by the OndimNode instance.

nodeAsText :: Maybe (t -> Text) Source #

Instances

Instances details
OndimNode Attribute Source # 
Instance details

Defined in Ondim.Internal.Class

OndimNode LByteString Source # 
Instance details

Defined in Ondim.Internal.Class

OndimNode Text Source # 
Instance details

Defined in Ondim.Internal.Class

(OndimNode a, Expansible (t a), Foldable t, Typeable t) => OndimNode (t a) Source # 
Instance details

Defined in Ondim.Internal.Class

Methods

identify :: t a -> Maybe Text Source #

attributes :: t a -> Ondim s [Attribute] Source #

children :: t a -> [t a] Source #

castFrom :: OndimNode a0 => Maybe (a0 -> [t a]) Source #

renderNode :: Maybe (t a -> LByteString) Source #

nodeAsText :: Maybe (t a -> Text) Source #

class Expansible t where Source #

Methods

expandSubs :: t -> Ondim s t Source #

Expand only the substructures of a node.

Instances

Instances details
Expansible Attribute Source # 
Instance details

Defined in Ondim.Internal.Class

Expansible LByteString Source # 
Instance details

Defined in Ondim.Internal.Class

Expansible Text Source # 
Instance details

Defined in Ondim.Internal.Class

Methods

expandSubs :: Text -> Ondim s Text Source #

OndimNode t => Expansible (Seq t) Source # 
Instance details

Defined in Ondim.Internal.Core

Methods

expandSubs :: Seq t -> Ondim s (Seq t) Source #

OndimNode t => Expansible [t] Source # 
Instance details

Defined in Ondim.Internal.Core

Methods

expandSubs :: [t] -> Ondim s [t] Source #