2013-07-30 07:25:19 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
2013-09-13 10:35:29 +00:00
|
|
|
#include <utility>
|
2013-09-13 03:04:10 +00:00
|
|
|
#include "util/list.h"
|
2013-12-08 07:21:07 +00:00
|
|
|
#include "util/optional.h"
|
2013-09-13 03:04:10 +00:00
|
|
|
#include "kernel/expr.h"
|
2013-07-30 07:25:19 +00:00
|
|
|
|
|
|
|
namespace lean {
|
2014-02-18 00:10:11 +00:00
|
|
|
typedef list<std::pair<name, expr>> context;
|
|
|
|
inline context extend(context const & c, name const & n, expr const & t) { return cons(mk_pair(n, t), c); }
|
|
|
|
std::pair<name, expr> const & lookup(context const & c, unsigned i);
|
|
|
|
optional<std::pair<name, expr>> find(context const & c, unsigned i);
|
2013-07-30 07:25:19 +00:00
|
|
|
}
|