hpp-0.3.0.0: A Haskell pre-processor

Safe HaskellSafe
LanguageHaskell2010

Hpp.Env

Description

A name binding context, or environment.

Synopsis

Documentation

emptyEnv :: [a] Source

An empty binding environment.

insertPair :: a -> [a] -> [a] Source

Add a (key,value) pair to an environment.

deleteKey :: Eq a => a -> [(a, b)] -> [(a, b)] Source

Delete an entry from an association list.

lookupKey :: Eq a => a -> [(a, b)] -> Maybe (b, [(a, b)]) Source

Looks up a value in an association list. If the key is found, the value is returned along with an updated association list with that key at the front.