|
definition: |
lookupFirstTable :: String -> Symboltable a b -> Maybe a
lookupFirstTable k (ST (m,_) Nothing ) = Map.lookup k m
lookupFirstTable k (ST (m,_) (Just s)) = case Map.lookup k m of
Just v -> Just v
Nothing -> lookupFirstTable k s
|
|
demand: |
argument 2 |
|
deterministic: |
deterministic operation |
|
documentation: |
Lookupfunction: First looks up the key in the current scope (first table) if it is not found the surrounding scope will be used and so on. Returns Nothing if no value was found. |
|
failfree: |
(_, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,{ST}) |-> {Just,Nothing}}
|
|
name: |
lookupFirstTable |
|
precedence: |
no precedence defined |
|
result-values: |
{Just,Nothing}
|
|
signature: |
String -> Symboltable a b -> Prelude.Maybe a |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |