| License | BSD-3 |
|---|---|
| Maintainer | autotaker@gmail.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Control.Env.Hierarchical.Internal
Description
Synopsis
- class Environment env where
- newtype Extends env = Extends env
- data Root = Root
- class Field a env where
- class Trans s (l :: [Type]) where
- data SomeInterface f env where
- SomeInterface :: Lens' env' (f env') -> Lens' env env' -> SomeInterface f env
- type family Has a env where ...
- type family Has1 f env where ...
- getL :: forall a env. Has a env => Lens' env a
- ifaceL :: forall f env. Has1 f env => SomeInterface f env
- runIF :: forall f env a. Has1 f env => (forall env'. f env' -> RIO env' a) -> RIO env a
- rootL :: Lens' x Root
- extendsL :: Lens' (Extends x) x
Documentation
class Environment env where Source #
Minimal complete definition
Nothing
Associated Types
Super env represents the inheritance relation between environments.
type Fields1 env :: [Type -> Type] Source #
interfaces that are fields of the environment
type Fields env :: [Type] Source #
fields of the environment
Wrapper that represents the super environment.
Constructors
| Extends env |
Instances
| Eq env => Eq (Extends env) Source # | |
| Ord env => Ord (Extends env) Source # | |
Defined in Control.Env.Hierarchical.Internal | |
| Show env => Show (Extends env) Source # | |
Root environment that does not have any fields.
Constructors
| Root |
data SomeInterface f env where Source #
Constructors
| SomeInterface :: Lens' env' (f env') -> Lens' env env' -> SomeInterface f env |
type family Has a env where ... Source #
Type constraint meaning env contains a as a (including ancestors') field.
An environment env contains unique value for each type T that satisfies
Has T env. If you want to depends on multiple values of the same type,
please distinguish them by using newtype.
Equations
| Has a env = HasAux a env (FindEnv a env (Addr env)) |
type family Has1 f env where ... Source #
Type constraint meaning env contains f env' for some ancestor env'
Equations
| Has1 f env = Has1Aux f env (FindEnv1 f env (Addr env)) |
ifaceL :: forall f env. Has1 f env => SomeInterface f env Source #