Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Protected Reactive Fields
This module defines several classes and operations that are used to create reactive fields and to bind reactive fields in the view to reactive fields in the model.
FIXME: Due to the restrictions in the type classes, the current version uses Model.ProtectedModel.ProtectedModelInternals.ProtectedModel.
Copyright : (C) Keera Studios Ltd, 2013 License : BSD3 Maintainer : support@keera.co.uk
Documentation
type Setter a b c = ProtectedModel b c -> a -> IO () Source #
type Getter a b c = ProtectedModel b c -> IO a Source #
type Modifier a b c = ProtectedModel b c -> (a -> a) -> IO () Source #
type ModifierIO a b c = ProtectedModel b c -> (a -> IO a) -> IO () Source #
class ReactiveField a b c d | a -> b, a -> c, a -> d where Source #
Instances
Event c => ReactiveField (ReactiveElement a b c) a b c Source # | |
Defined in Hails.MVC.Model.ProtectedModel.Reactive events :: ReactiveElement a b c -> [c] Source # |
onChanged :: (Event d, ReactiveField a b c d) => ProtectedModel c d -> a -> IO () -> IO () Source #
class ReactiveField a b c d => ReactiveReadField a b c d where Source #
Instances
Event c => ReactiveReadField (ReactiveElement a b c) a b c Source # | |
Defined in Hails.MVC.Model.ProtectedModel.Reactive getter :: ReactiveElement a b c -> Getter a b c Source # |
class ReactiveWriteField a b c d where Source #
Instances
Event c => ReactiveWriteField (ReactiveElement a b c) a b c Source # | |
Defined in Hails.MVC.Model.ProtectedModel.Reactive setter :: ReactiveElement a b c -> Setter a b c Source # |
class (ReactiveField a b c d, ReactiveReadField a b c d, ReactiveWriteField a b c d) => ReactiveReadWriteField a b c d where Source #
Nothing
modifier :: a -> Modifier b c d Source #
modifierIO :: a -> ModifierIO b c d Source #
Instances
Event c => ReactiveReadWriteField (ReactiveElement a b c) a b c Source # | |
Defined in Hails.MVC.Model.ProtectedModel.Reactive modifier :: ReactiveElement a b c -> Modifier a b c Source # modifierIO :: ReactiveElement a b c -> ModifierIO a b c Source # |
data Event c => ReactiveElement a b c Source #
Instances
Event c => ReactiveReadWriteField (ReactiveElement a b c) a b c Source # | |
Defined in Hails.MVC.Model.ProtectedModel.Reactive modifier :: ReactiveElement a b c -> Modifier a b c Source # modifierIO :: ReactiveElement a b c -> ModifierIO a b c Source # | |
Event c => ReactiveWriteField (ReactiveElement a b c) a b c Source # | |
Defined in Hails.MVC.Model.ProtectedModel.Reactive setter :: ReactiveElement a b c -> Setter a b c Source # | |
Event c => ReactiveReadField (ReactiveElement a b c) a b c Source # | |
Defined in Hails.MVC.Model.ProtectedModel.Reactive getter :: ReactiveElement a b c -> Getter a b c Source # | |
Event c => ReactiveField (ReactiveElement a b c) a b c Source # | |
Defined in Hails.MVC.Model.ProtectedModel.Reactive events :: ReactiveElement a b c -> [c] Source # |
type FieldAccessor a b c = ProtectedModel b c -> ReactiveFieldReadWrite IO a Source #
mkFieldAccessor :: (InitialisedEvent c, Event c) => ReactiveElement a b c -> ProtectedModel b c -> ReactiveFieldReadWrite IO a Source #