Safe Haskell | None |
---|---|
Language | Haskell2010 |
Lookups combined into stack of lookups, allowing combined lookup coupled with updates on top of stack only
Documentation
class Stacked stk where Source #
Functionality on top of Lookup
for awareness of a scope.
Minimal definition lifts
, 'unlifts,', 'top'/'topM', 'pop'/'popM', 'push'/'pushM'
lifts :: StackedElt stk -> stk Source #
unlifts :: stk -> [StackedElt stk] Source #
top :: stk -> StackedElt stk Source #
pop :: stk -> (StackedElt stk, stk) Source #
push :: StackedElt stk -> stk -> stk Source #
topM :: MonadState stk m => m (StackedElt stk) Source #
popM :: MonadState stk m => m (StackedElt stk) Source #
pushM :: MonadState stk m => StackedElt stk -> m () Source #
pops :: stk -> (stk, stk) Source #
:: stk | |
-> stk | |
-> stk | push, but only top of first arg |
topsM :: MonadState stk m => m stk Source #
popsM :: MonadState stk m => m stk Source #
pushsM :: MonadState stk m => stk -> m () Source #
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 # |
type family StackedElt stk :: * Source #
Instances
type StackedElt (Stacks e) Source # | |
Defined in CHR.Data.Lookup.Stacked | |
type StackedElt (StackedVarLookup s) Source # | |
Defined in CHR.Data.VarLookup |
Stacked Lookup derived from a base one, to allow a use of multiple lookups but update on top only