get_val_from_symbolTable :: String -> Double -> SymbolTable -> Double
get_val_from_symbolTable var aTime symbols =
  
  case M.lookup var (molSymbols symbols) of
    Just value -> fromIntegral value
    Nothing    -> case (M.!) (varSymbols symbols) var of
                    Constant c -> c
                    Function s -> rpn_compute symbols aTime s



-- | try to evaluate an RPN stack and return the result as a Double
-- if we can evaluate it during parse-time (i.e. if it doesn't contain
-- things like time and molecule count)
-- NOTE: We do _not_ want to substitute any molecule counts even
-- if we should now them; molecule counts are inherently dynamic
-- and need to be evaluated at run-time
get_val_from_symbolTable :: String -> Double -> SymbolTable -> Double
get_val_from_symbolTable var aTime symbols =
  
  case M.lookup var (molSymbols symbols) of
    Just value -> fromIntegral value
    Nothing    -> case (M.!) (varSymbols symbols) var of
                    Constant c -> c
                    Function s -> rpn_compute symbols aTime s



-- | try to evaluate an RPN stack and return the result as a Double
-- if we can evaluate it during parse-time (i.e. if it doesn't contain
-- things like time and molecule count)
-- NOTE: We do _not_ want to substitute any molecule counts even
-- if we should now them; molecule counts are inherently dynamic
-- and need to be evaluated at run-time
get_val_from_symbolTable var aTime symbols =
  
  case M.lookup var (molSymbols symbols) of
    Just value -> fromIntegral value
    Nothing    -> case (M.!) (varSymbols symbols) var of
                    Constant c -> c
                    Function s -> rpn_compute symbols aTime s



-- | try to evaluate an RPN stack and return the result as a Double
-- if we can evaluate it during parse-time (i.e. if it doesn't contain
-- things like time and molecule count)
-- NOTE: We do _not_ want to substitute any molecule counts even
-- if we should now them; molecule counts are inherently dynamic
-- and need to be evaluated at run-time