Safe Haskell | None |
---|---|
Language | Haskell2010 |
A simple application architecture style inspired by PureScript's Pux framework.
Synopsis
- data App state event = App {
- update :: state -> event -> Transition state event
- view :: state -> AppView event
- inputs :: [Producer event IO ()]
- initialState :: state
- type AppView event = Bin Window Widget event
- data Transition state event
- = Transition state (IO (Maybe event))
- | Exit
- run :: Typeable event => App state event -> IO ()
- runLoop :: Typeable event => App state event -> IO ()
Documentation
Describes an state reducer application.
App | |
|
data Transition state event Source #
The result of applying the update
function, deciding if and how to
transition to the next state.
Transition state (IO (Maybe event)) | |
Exit | Exit the application. |
Initialize GTK and run the application in it. This is a
convenience function that is highly recommended. If you need more
flexibility, e.g. to set up GTK+ yourself, use runLoop
instead.