Sparkle
- Package
- purescript-sparkle
- Repository
- sharkdp/purescript-sparkle
Sparkle is a library that automatically creates interactive user interfaces from type signatures.
#Flammable Source
class Flammable a whereA type class for data types that can be used for interactive Sparkle UIs. Instances for type
a must provide a way to create a Flare UI which holds a value of type a.
Members
Instances
Flammable NumberFlammable IntFlammable StringFlammable CharFlammable Boolean(Flammable a, Flammable b) => Flammable (Tuple a b)(Flammable a) => Flammable (Maybe a)(Flammable a, Flammable b) => Flammable (Either a b)Flammable Color(RowToList row list, FlammableRowList list row) => Flammable (Record row)Flammable NonNegativeIntFlammable SmallIntFlammable SmallNumberFlammable Multiline(BoundedEnum a, Show a) => Flammable (WrapEnum a)(Flammable a) => Flammable (List a)(Flammable a) => Flammable (Array a)
#FlammableRowList Source
class FlammableRowList (list :: RowList) (row :: Row Type) | list -> row whereA helper type class to implement a Flammable instance for records.
Members
examplesRecord :: RLProxy list -> NonEmpty List (Record row)sparkRecord :: forall e. RLProxy list -> UI e (Record row)
Instances
FlammableRowList Nil ()(Flammable a, FlammableRowList listRest rowRest, RowLacks s rowRest, RowCons s a rowRest rowFull, RowToList rowFull (Cons s a listRest), IsSymbol s) => FlammableRowList (Cons s a listRest) rowFull
#NonNegativeInt Source
#SmallNumber Source
newtype SmallNumberA newtype for numbers in the closed interval from 0.0 and 1.0.
Constructors
Instances
#WrapEnum Source
newtype WrapEnum aConstructors
WrapEnum a
Instances
(BoundedEnum a, Show a) => Flammable (WrapEnum a)(Generic a) => Interactive (WrapEnum a)
#Interactive Source
class Interactive t whereA type class for interactive UIs. Instances must provide a way to create a Flare UI which
returns a Renderable output.
Members
interactive :: forall e. UI e t -> UI e Renderable
Instances
Interactive NumberInteractive IntInteractive StringInteractive CharInteractive BooleanInteractive OrderingInteractive GenericSpine(Generic a) => Interactive (Maybe a)(Generic a, Generic b) => Interactive (Either a b)(Generic a, Generic b) => Interactive (Tuple a b)(Generic a) => Interactive (Array a)(Generic a) => Interactive (List a)Interactive Color(RowToList row list, PrettyPrintRowList list row) => Interactive (Record row)(Generic a) => Interactive (WrapEnum a)(Flammable a, Interactive b) => Interactive (a -> b)
#interactiveShow Source
interactiveShow :: forall e t. Show t => UI e t -> UI e RenderableA default interactive implementation for any Showable type.
#interactiveFoldable Source
interactiveFoldable :: forall e a f. Foldable f => Generic a => UI e (f a) -> UI e RenderableA default interactive implementation for Foldable types.
#interactiveGeneric Source
interactiveGeneric :: forall e a. Generic a => UI e a -> UI e RenderableA default interactive implementation for types with a Generic instance.
#PrettyPrintRowList Source
class PrettyPrintRowList (list :: RowList) (row :: Row Type) | list -> row whereA helper type class to implement an Interactive instance for records.
Members
Instances
PrettyPrintRowList Nil ()(Generic a, PrettyPrintRowList listRest rowRest, RowLacks s rowRest, RowCons s a rowRest rowFull, RowToList rowFull (Cons s a listRest), IsSymbol s) => PrettyPrintRowList (Cons s a listRest) rowFull
#sparkleDoc' Source
sparkleDoc' :: forall e t. Interactive t => ElementId -> Label -> Maybe String -> t -> Eff (channel :: CHANNEL, dom :: DOM | e) UnitRun an interactive test. The ID specifies the parent element to which the test will be appended and the label provides a title for the test. The String argument is an optional documentation string.
#sparkleDoc Source
sparkleDoc :: forall e t. Interactive t => Label -> Maybe String -> t -> Eff (channel :: CHANNEL, dom :: DOM | e) UnitRun an interactive test. The label provides a title for the test. The String argument is an
optional documentation string.
- Modules
- Sparkle