Safe Haskell | None |
---|---|
Language | Haskell98 |
The environment that contains both the view and the model.
- view :: (GtkGUI a, Event c) => CEnv a b c -> a
- model :: CEnv a b c -> ProtectedModel b c
- createCEnv :: (GtkGUI a, Event c) => b -> IO (CEnv a b c)
- installCondition :: (GtkGUI a, Event c) => CEnv a b c -> (CEnv a b c -> IO ()) -> IO ()
- installConditions :: (GtkGUI a, Event c) => CEnv a b c -> [CEnv a b c -> IO ()] -> IO ()
Documentation
model :: CEnv a b c -> ProtectedModel b c Source
createCEnv :: (GtkGUI a, Event c) => b -> IO (CEnv a b c) Source
To create an Environment, we just need to provide the default internal model. The initialisation operations for the view and the protected model are called internally.
installCondition :: (GtkGUI a, Event c) => CEnv a b c -> (CEnv a b c -> IO ()) -> IO () Source
Installs a condition in the Combined Environment.
NOTE: This is an experimental function and might be removed in the future.
installConditions :: (GtkGUI a, Event c) => CEnv a b c -> [CEnv a b c -> IO ()] -> IO () Source
Installs several conditions in the Combined Environment.
FIXME: I really don't like the syntax installConditions cenv [ rv1 =:= rf1 , ... ]
I'd rather use installConditions cenv $ do rv1 =:= rf1 rv2 =:= rf2 ... Which means that I would have to define a monad.
NOTE: This is an experimental function and might be removed in the future.