NITRO

INTRO

The Network.N2O.Nitro module contains events, actions and elements rendering.

EVENT

Listing 1. Nitro Event
data Event a = Event { eventTarget :: String , eventPostback :: a , eventType :: String , eventSource :: [String] } deriving (Show, Generic)

renderEvent :: Event a -> N2O f a b BL.ByteString

ACTION

Listing 1. Nitro Actions
data Action a = AEvent (Event a) | AElement (Element a) | ARaw BL.ByteString deriving (Show, Generic)

renderAction :: Action a -> N2O f a b BL.ByteString

wire :: forall f a b. (B.Binary a) => Action a -> N2O f a b BL.ByteString

wireEl :: (B.Binary a) => Element a -> N2O f a b BL.ByteString

getActions :: (B.Binary a) => N2O f a b [Action a]

putActions :: (B.Binary a) => [Action a] -> N2O f a b ()

ELEMENT

Listing 1. Nitro Element
baseElement = Element { id = "" , name = undefined , postback = undefined , body = [] , source = [] , noBody = False , noClosing = False } button = baseElement { name = "button" , source = [] } panel = baseElement { name = "div" }

renderElement :: (B.Binary a) => Element a -> N2O f a b BL.ByteString

This module may refer to: TYPES, CORE