Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module CHR.Data.Lookup.Types
- module CHR.Data.Lookup.Instances
- class Scoped c
- class Stacked stk
- lookupResolveVar :: Lookup m (VarLookupKey m) (VarLookupVal m) => (VarLookupVal m -> Maybe (VarLookupKey m)) -> VarLookupKey m -> m -> Maybe (VarLookupVal m)
- lookupResolveVal :: Lookup m (VarLookupKey m) (VarLookupVal m) => (VarLookupVal m -> Maybe (VarLookupKey m)) -> VarLookupVal m -> m -> Maybe (VarLookupVal m)
- lookupResolveAndContinueM :: (Monad m, Lookup s (VarLookupKey s) (VarLookupVal s)) => (VarLookupVal s -> Maybe (VarLookupKey s)) -> m s -> m a -> (VarLookupVal s -> m a) -> VarLookupKey s -> m a
- inverse :: (Lookup l1 k1 v1, Lookup l2 k2 v2) => (k1 -> v1 -> (k2, v2)) -> l1 -> l2
Documentation
module CHR.Data.Lookup.Types
module CHR.Data.Lookup.Instances
Functionality on top of Lookup
for awareness of a scope.
Minimal definition lifts
, 'unlifts,', 'top'/'topM', 'pop'/'popM', 'push'/'pushM'
Instances
Stacked (Stacks lkup) Source # | |
Defined in CHR.Data.Lookup.Stacked lifts :: StackedElt (Stacks lkup) -> Stacks lkup Source # unlifts :: Stacks lkup -> [StackedElt (Stacks lkup)] Source # top :: Stacks lkup -> StackedElt (Stacks lkup) Source # pop :: Stacks lkup -> (StackedElt (Stacks lkup), Stacks lkup) Source # push :: StackedElt (Stacks lkup) -> Stacks lkup -> Stacks lkup Source # topM :: MonadState (Stacks lkup) m => m (StackedElt (Stacks lkup)) Source # popM :: MonadState (Stacks lkup) m => m (StackedElt (Stacks lkup)) Source # pushM :: MonadState (Stacks lkup) m => StackedElt (Stacks lkup) -> m () Source # tops :: Stacks lkup -> Stacks lkup Source # pops :: Stacks lkup -> (Stacks lkup, Stacks lkup) Source # pushs :: Stacks lkup -> Stacks lkup -> Stacks lkup Source # topsM :: MonadState (Stacks lkup) m => m (Stacks lkup) Source # popsM :: MonadState (Stacks lkup) m => m (Stacks lkup) Source # pushsM :: MonadState (Stacks lkup) m => Stacks lkup -> m () Source # |
lookupResolveVar :: Lookup m (VarLookupKey m) (VarLookupVal m) => (VarLookupVal m -> Maybe (VarLookupKey m)) -> VarLookupKey m -> m -> Maybe (VarLookupVal m) Source #
Fully resolve lookup
lookupResolveVal :: Lookup m (VarLookupKey m) (VarLookupVal m) => (VarLookupVal m -> Maybe (VarLookupKey m)) -> VarLookupVal m -> m -> Maybe (VarLookupVal m) Source #
Fully resolve lookup
lookupResolveAndContinueM :: (Monad m, Lookup s (VarLookupKey s) (VarLookupVal s)) => (VarLookupVal s -> Maybe (VarLookupKey s)) -> m s -> m a -> (VarLookupVal s -> m a) -> VarLookupKey s -> m a Source #
Monadically lookup a variable, resolve it, continue with either a fail or success monad continuation