Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Editor a = Editor {
- editorTidings :: Tidings a
- editorElement :: Element
- edited :: Editor a -> Event a
- contents :: Editor a -> Behavior a
- data EditorFactory a b
- createEditor :: EditorFactory b a -> Behavior b -> UI (Editor a)
- class Editable a where
- (|*|) :: EditorFactory s (b -> a) -> EditorFactory s b -> EditorFactory s a
- (|*) :: EditorFactory s a -> UI Element -> EditorFactory s a
- (*|) :: UI Element -> EditorFactory s a -> EditorFactory s a
- (-*-) :: EditorFactory s (b -> a) -> EditorFactory s b -> EditorFactory s a
- (-*) :: EditorFactory s a -> UI Element -> EditorFactory s a
- (*-) :: UI Element -> EditorFactory s a -> EditorFactory s a
- field :: String -> (out -> inn) -> EditorFactory inn a -> EditorFactory out a
- editorUnit :: EditorFactory a ()
- editorReadShow :: (Read a, Show a) => EditorFactory (Maybe a) (Maybe a)
- editorEnumBounded :: (Show a, Ord a, Enum a, Bounded a) => Behavior (a -> UI Element) -> EditorFactory (Maybe a) (Maybe a)
- editorSum :: (Show tag, Ord tag) => [(tag, EditorFactory b b)] -> (b -> tag) -> EditorFactory b b
- editorJust :: EditorFactory (Maybe a) (Maybe a) -> EditorFactory a a
- editorGeneric :: forall a. (Generic a, HasDatatypeInfo a, All (All Editable `And` All Default) (Code a)) => EditorFactory a a
- editorGenericSimple :: forall a xs. (Generic a, HasDatatypeInfo a, All Editable xs, Code a ~ '[xs]) => EditorFactory a a
- newtype Compose k k1 f g a :: forall k k1. (k1 -> *) -> (k -> k1) -> k -> * = Compose {
- getCompose :: f (g a)
Editors
A widget for editing values of type a
.
Editor | |
|
data EditorFactory a b Source #
A newtype wrapper that provides a Profunctor
instance.
createEditor :: EditorFactory b a -> Behavior b -> UI (Editor a) Source #
class Editable a where Source #
editor :: EditorFactory a a Source #
editor :: (Generic a, HasDatatypeInfo a, All (All Editable `And` All Default) (Code a)) => EditorFactory a a Source #
Editable Bool Source # | |
Editable Double Source # | |
Editable Int Source # | |
Editable () Source # | |
Editable String Source # | |
Editable (Maybe Double) Source # | |
Editable (Maybe Int) Source # | |
Editable a => Editable (Identity a) Source # | |
(Editable a, Editable b) => Editable (a, b) Source # | |
All * Editable xs => Editable (NP * I xs) Source # | Tuple editor without fields |
Editor compoosition
(|*|) :: EditorFactory s (b -> a) -> EditorFactory s b -> EditorFactory s a infixl 4 Source #
(|*) :: EditorFactory s a -> UI Element -> EditorFactory s a infixl 5 Source #
(*|) :: UI Element -> EditorFactory s a -> EditorFactory s a infixl 5 Source #
(-*-) :: EditorFactory s (b -> a) -> EditorFactory s b -> EditorFactory s a infixl 4 Source #
(-*) :: EditorFactory s a -> UI Element -> EditorFactory s a infixl 5 Source #
(*-) :: UI Element -> EditorFactory s a -> EditorFactory s a infixl 5 Source #
field :: String -> (out -> inn) -> EditorFactory inn a -> EditorFactory out a Source #
A helper that arranges a label with the field name and the editor horizontally.
Editor constructors
editorUnit :: EditorFactory a () Source #
editorReadShow :: (Read a, Show a) => EditorFactory (Maybe a) (Maybe a) Source #
editorEnumBounded :: (Show a, Ord a, Enum a, Bounded a) => Behavior (a -> UI Element) -> EditorFactory (Maybe a) (Maybe a) Source #
editorSum :: (Show tag, Ord tag) => [(tag, EditorFactory b b)] -> (b -> tag) -> EditorFactory b b Source #
editorJust :: EditorFactory (Maybe a) (Maybe a) -> EditorFactory a a Source #
Generic editors
editorGeneric :: forall a. (Generic a, HasDatatypeInfo a, All (All Editable `And` All Default) (Code a)) => EditorFactory a a Source #
editorGenericSimple :: forall a xs. (Generic a, HasDatatypeInfo a, All Editable xs, Code a ~ '[xs]) => EditorFactory a a Source #
Reexports
newtype Compose k k1 f g a :: forall k k1. (k1 -> *) -> (k -> k1) -> k -> * infixr 9 #
Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.
Compose infixr 9 | |
|
(Functor f, Functor g) => Functor (Compose * * f g) | |
(Applicative f, Applicative g) => Applicative (Compose * * f g) | |
(Foldable f, Foldable g) => Foldable (Compose * * f g) | |
(Traversable f, Traversable g) => Traversable (Compose * * f g) | |
Functor f => Generic1 (Compose * * f g) | |
(Alternative f, Applicative g) => Alternative (Compose * * f g) | |
(Eq1 f, Eq1 g) => Eq1 (Compose * * f g) | |
(Ord1 f, Ord1 g) => Ord1 (Compose * * f g) | |
(Read1 f, Read1 g) => Read1 (Compose * * f g) | |
(Show1 f, Show1 g) => Show1 (Compose * * f g) | |
(Eq1 f, Eq1 g, Eq a) => Eq (Compose * * f g a) | |
(Data (f (g a)), Typeable * k, Typeable * k1, Typeable (k1 -> k) g, Typeable (k -> *) f, Typeable k1 a) => Data (Compose k1 k f g a) | |
(Ord1 f, Ord1 g, Ord a) => Ord (Compose * * f g a) | |
(Read1 f, Read1 g, Read a) => Read (Compose * * f g a) | |
(Show1 f, Show1 g, Show a) => Show (Compose * * f g a) | |
Generic (Compose k1 k f g a) | |
type Rep1 (Compose * * f g) | |
type Rep (Compose k1 k f g a) | |