Module

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  where

A 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

#FlammableRowList Source

class FlammableRowList (list :: RowList) (row :: Row Type) | list -> row where

A helper type class to implement a Flammable instance for records.

Members

Instances

#NonNegativeInt Source

newtype NonNegativeInt

A newtype for non-negative integer values.

Constructors

Instances

#SmallInt Source

newtype SmallInt

A newtype for small integer values in the range from 0 to 100.

Constructors

Instances

#SmallNumber Source

newtype SmallNumber

A newtype for numbers in the closed interval from 0.0 and 1.0.

Constructors

Instances

#Multiline Source

newtype Multiline

A newtype for strings where "\n" is parsed as a newline (instead of "\n").

Constructors

Instances

#WrapEnum Source

newtype WrapEnum a

Constructors

Instances

#Renderable Source

data Renderable

A data type that describes possible output actions and values for an interactive test.

Constructors

#Interactive Source

class Interactive t  where

A type class for interactive UIs. Instances must provide a way to create a Flare UI which returns a Renderable output.

Members

Instances

#interactiveShow Source

interactiveShow :: forall e t. Show t => UI e t -> UI e Renderable

A default interactive implementation for any Showable type.

#interactiveFoldable Source

interactiveFoldable :: forall e a f. Foldable f => Generic a => UI e (f a) -> UI e Renderable

A default interactive implementation for Foldable types.

#interactiveGeneric Source

interactiveGeneric :: forall e a. Generic a => UI e a -> UI e Renderable

A default interactive implementation for types with a Generic instance.

#PrettyPrintRowList Source

class PrettyPrintRowList (list :: RowList) (row :: Row Type) | list -> row where

A helper type class to implement an Interactive instance for records.

Members

Instances

#sparkleDoc' Source

sparkleDoc' :: forall e t. Interactive t => ElementId -> Label -> Maybe String -> t -> Eff (channel :: CHANNEL, dom :: DOM | e) Unit

Run 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) Unit

Run an interactive test. The label provides a title for the test. The String argument is an optional documentation string.

#sparkle' Source

sparkle' :: forall e t. Interactive t => ElementId -> Label -> t -> Eff (channel :: CHANNEL, dom :: DOM | e) Unit

Run 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.

#sparkle Source

sparkle :: forall e t. Interactive t => Label -> t -> Eff (channel :: CHANNEL, dom :: DOM | e) Unit

Run an interactive test. The label provides a title for the test.

Modules
Sparkle