Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.MSH
Contents
- run the internal call (if the selector on the RHS is a method)
- run the internal getter (if the selector on the RHS is a field)
- run the internal call (if the selector on the RHS is a method)
- run the internal getter (if the selector on the RHS is a field)
- run the internal call (if the selector on the RHS is a method)
- run the internal getter (if the selector on the RHS is a field)
- module Control.Lens
- module Control.Monad.Identity
- module Control.Monad.State
- state :: QuasiQuoter
- stateParser :: String -> Q [Dec]
- data CallType = ExtCall
- data RunnableQuery ty obj st ctx r where
- MkExtCall :: ctx (r, obj) -> RunnableQuery ExtCall obj st ctx r
- class Functor ctx => CallCtx ty ctx where
- type CtxResult ty ctx r :: *
- result :: RunnableQuery ty obj st ctx r -> CtxResult ty ctx r
- object :: RunnableQuery ty obj st ctx r -> CtxResult ty ctx obj
- data MemberType
- data FieldType
- type family FieldComposeResult lhs rhs :: FieldType
- data Selector ty o s m a where
- data This o s m a where
- type family QueryObject obj :: *
- type family QueryMonad obj m :: * -> *
- type family QueryResult obj ty st m r :: *
- class Monad m => Object obj st m where
- this :: This obj st m obj
- (.!) :: forall r ty. obj -> Selector ty (QueryObject obj) st (QueryMonad obj m) r -> QueryResult obj ty st m r
- (.$) :: (Monad ctx, Functor f) => Selector lty obj st ctx (f a) -> Selector rty a st' Identity b -> Selector (FieldComposeResult lty rty) obj st ctx (f b)
- _msh_rt_invalid_call_abstract :: String
- _msh_rt_invalid_call_state :: String
- class SetterContext r o s m where
- class ValueContext r val where
- class HasData obj d | obj -> d where
- extractData :: obj -> d
- class Cast sub sup | sub -> sup where
- downcast :: sub -> sup
- class New obj where
- type Void = ()
- switch :: Monad m => Selector ty o s m val -> (val -> StateT s m b) -> StateT s m b
- (<:) :: Monad m => Selector Field o s m val -> val -> StateT s m ()
Documentation
module Control.Lens
module Control.Monad.Identity
module Control.Monad.State
stateParser :: String -> Q [Dec] Source
data RunnableQuery ty obj st ctx r where Source
Constructors
MkExtCall :: ctx (r, obj) -> RunnableQuery ExtCall obj st ctx r |
class Functor ctx => CallCtx ty ctx where Source
Represents a context in which combinators may be used.
Methods
result :: RunnableQuery ty obj st ctx r -> CtxResult ty ctx r Source
object :: RunnableQuery ty obj st ctx r -> CtxResult ty ctx obj Source
data MemberType Source
type family FieldComposeResult lhs rhs :: FieldType Source
data Selector ty o s m a where Source
Constructors
MkMethod :: StateT s m a -> (o -> m (a, o)) -> Selector Method o s m a | |
MkField :: (o -> m (a, o)) -> StateT s m a -> (o -> a -> m ((), o)) -> (a -> StateT s m ()) -> Selector Field o s m a |
Instances
(Object obj st ctx, Object r st' Identity, (~) (* -> *) m Identity) => Object (Selector Method obj st ctx r) st' m Source | |
(Object obj st ctx, Object r st' Identity, (~) (* -> *) m Identity) => Object (Selector Field obj st ctx r) st' m Source | |
type QueryObject (Selector Method obj st ctx r) = r Source | |
type QueryObject (Selector Field obj st ctx r) = r Source | |
type QueryMonad (Selector Method obj st ctx r) ctx' = ctx' Source | |
type QueryMonad (Selector Field obj st ctx r) ctx' = ctx' Source | |
type QueryResult (Selector Method obj st ctx r) ty st' m x = Selector Method obj st ctx x Source | |
type QueryResult (Selector Field obj st ctx r) Field st' m x = Selector Field obj st ctx x Source | |
type QueryResult (Selector Field obj st ctx r) Method st' m x = Selector Method obj st ctx x Source |
data This o s m a where Source
Instances
(Object obj st ctx, Object r st' ctx', (~) (* -> *) ctx ctx', (~) * st st') => Object (This obj st ctx r) st' ctx' Source | |
type QueryObject (This obj st ctx r) = obj Source | |
type QueryMonad (This obj st ctx r) ctx' = ctx' Source | |
type QueryResult (This obj st ctx r) ty st' m x = StateT st' ctx x Source |
type family QueryObject obj :: * Source
Instances
type QueryObject (This obj st ctx r) = obj Source | |
type QueryObject (Selector Method obj st ctx r) = r Source | |
type QueryObject (Selector Field obj st ctx r) = r Source |
type family QueryMonad obj m :: * -> * Source
Instances
type QueryMonad (This obj st ctx r) ctx' = ctx' Source | |
type QueryMonad (Selector Method obj st ctx r) ctx' = ctx' Source | |
type QueryMonad (Selector Field obj st ctx r) ctx' = ctx' Source |
type family QueryResult obj ty st m r :: * Source
Instances
type QueryResult (This obj st ctx r) ty st' m x = StateT st' ctx x Source | |
type QueryResult (Selector Method obj st ctx r) ty st' m x = Selector Method obj st ctx x Source | |
type QueryResult (Selector Field obj st ctx r) Field st' m x = Selector Field obj st ctx x Source | |
type QueryResult (Selector Field obj st ctx r) Method st' m x = Selector Method obj st ctx x Source |
class Monad m => Object obj st m where Source
Minimal complete definition
Methods
this :: This obj st m obj Source
(.!) :: forall r ty. obj -> Selector ty (QueryObject obj) st (QueryMonad obj m) r -> QueryResult obj ty st m r infixr 8 Source
Instances
(Object obj st ctx, Object r st' ctx', (~) (* -> *) ctx ctx', (~) * st st') => Object (This obj st ctx r) st' ctx' Source | |
(Object obj st ctx, Object r st' Identity, (~) (* -> *) m Identity) => Object (Selector Method obj st ctx r) st' m Source | |
(Object obj st ctx, Object r st' Identity, (~) (* -> *) m Identity) => Object (Selector Field obj st ctx r) st' m Source |
(.$) :: (Monad ctx, Functor f) => Selector lty obj st ctx (f a) -> Selector rty a st' Identity b -> Selector (FieldComposeResult lty rty) obj st ctx (f b) Source
run the internal call (if the selector on the RHS is a method)
run the internal getter (if the selector on the RHS is a field)
run the internal call (if the selector on the RHS is a method)
run the internal getter (if the selector on the RHS is a field)
run the internal call (if the selector on the RHS is a method)
run the internal getter (if the selector on the RHS is a field)
class ValueContext r val Source
Instances
ValueContext (StateT s m val) val Source |
class HasData obj d | obj -> d where Source
Methods
extractData :: obj -> d Source