2014-07-29 02:04:57 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "frontends/lean/cmd_table.h"
|
2015-01-17 01:08:48 +00:00
|
|
|
#include "frontends/lean/parse_table.h"
|
2014-07-29 02:04:57 +00:00
|
|
|
namespace lean {
|
2015-01-17 01:08:48 +00:00
|
|
|
void init_structure_instance_parsing_rules(parse_table & r);
|
|
|
|
bool is_structure_instance(expr const & e);
|
|
|
|
void destruct_structure_instance(expr const & e, expr & t, buffer<name> & field_names,
|
|
|
|
buffer<expr> & field_values, buffer<expr> & using_exprs);
|
2014-11-05 22:06:54 +00:00
|
|
|
void get_structure_fields(environment const & env, name const & S, buffer<name> & fields);
|
2014-07-29 02:04:57 +00:00
|
|
|
void register_structure_cmd(cmd_table & r);
|
2015-05-27 05:19:42 +00:00
|
|
|
/** \brief Return true iff \c S is a structure created with the structure command */
|
|
|
|
bool is_structure(environment const & env, name const & S);
|
2014-09-23 17:00:36 +00:00
|
|
|
void initialize_structure_cmd();
|
|
|
|
void finalize_structure_cmd();
|
2014-07-29 02:04:57 +00:00
|
|
|
}
|