2013-09-13 01:25:38 +00:00
|
|
|
/*
|
2014-05-31 03:26:06 +00:00
|
|
|
Copyright (c) 2013-2014 Microsoft Corporation. All rights reserved.
|
2013-09-13 01:25:38 +00:00
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
2013-12-20 05:36:17 +00:00
|
|
|
#include "util/lua.h"
|
2013-09-13 01:25:38 +00:00
|
|
|
#include "kernel/expr.h"
|
|
|
|
|
2014-05-31 03:26:06 +00:00
|
|
|
// Placeholders are used to mark locations where additional
|
|
|
|
// metavariables should be inserted.
|
2013-09-13 01:25:38 +00:00
|
|
|
namespace lean {
|
2014-05-31 03:26:06 +00:00
|
|
|
/** \brief Return a new universe level placeholder. */
|
|
|
|
level mk_level_placeholder();
|
2013-09-13 01:25:38 +00:00
|
|
|
|
2014-05-31 03:26:06 +00:00
|
|
|
/** \brief Return a new expression placeholder expression. */
|
2014-06-16 21:35:55 +00:00
|
|
|
expr mk_expr_placeholder(optional<expr> const & type = none_expr());
|
2014-05-31 03:26:06 +00:00
|
|
|
|
|
|
|
/** \brief Return true if the given level is a placeholder. */
|
|
|
|
bool is_placeholder(level const & e);
|
|
|
|
|
|
|
|
/** \brief Return true iff the given expression is a placeholder. */
|
2013-09-13 01:25:38 +00:00
|
|
|
bool is_placeholder(expr const & e);
|
|
|
|
|
2014-06-16 21:35:55 +00:00
|
|
|
/** \brief Return the type of the placeholder (if available) */
|
|
|
|
optional<expr> placeholder_type(expr const & e);
|
|
|
|
|
2014-05-31 03:26:06 +00:00
|
|
|
/** \brief Return true iff the given expression contains placeholders. */
|
2013-09-13 01:25:38 +00:00
|
|
|
bool has_placeholder(expr const & e);
|
2013-09-17 18:09:59 +00:00
|
|
|
|
2013-12-20 05:36:17 +00:00
|
|
|
void open_placeholder(lua_State * L);
|
2013-09-13 01:25:38 +00:00
|
|
|
}
|