eval (Var s) = do
  st <- get
  getVar s st
  where
    getVar s st = do
      let t = symbolTable st
      case M.lookup s t of
        Just v -> return v
        Nothing -> do
          let p = parent st
          case p of
            Just prnt -> do
              getVar s prnt
            Nothing -> return Nil
eval (Var s) = do
  st <- get
  getVar s st
  where
    getVar s st = do
      let t = symbolTable st
      case M.lookup s t of
        Just v -> return v
        Nothing -> do
          let p = parent st
          case p of
            Just prnt -> do
              getVar s prnt
            Nothing -> return Nil
eval (Var s) = do
  st <- get
  getVar s st
  where
    getVar s st = do
      let t = symbolTable st
      case M.lookup s t of
        Just v -> return v
        Nothing -> do
          let p = parent st
          case p of
            Just prnt -> do
              getVar s prnt
            Nothing -> return Nil