chr-data-0.1.0.0: Datatypes required for chr library

Safe HaskellNone
LanguageHaskell2010

CHR.Data.Lookup

Synopsis

Documentation

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

inverse :: (Lookup l1 k1 v1, Lookup l2 k2 v2) => (k1 -> v1 -> (k2, v2)) -> l1 -> l2 Source #

Inverse of a lookup