2014-05-16 00:23:36 +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
|
2014-05-16 01:00:09 +00:00
|
|
|
#include <string>
|
2014-05-16 00:23:36 +00:00
|
|
|
#include "util/serializer.h"
|
2014-05-20 17:41:36 +00:00
|
|
|
#include "kernel/declaration.h"
|
2014-05-26 22:16:29 +00:00
|
|
|
#include "kernel/inductive/inductive.h"
|
2014-05-16 00:23:36 +00:00
|
|
|
|
|
|
|
namespace lean {
|
|
|
|
serializer & operator<<(serializer & s, level const & l);
|
|
|
|
level read_level(deserializer & d);
|
|
|
|
inline deserializer & operator>>(deserializer & d, level & l) { l = read_level(d); return d; }
|
|
|
|
|
|
|
|
serializer & operator<<(serializer & s, levels const & ls);
|
|
|
|
levels read_levels(deserializer & d);
|
|
|
|
|
2014-08-10 16:53:13 +00:00
|
|
|
serializer & operator<<(serializer & s, level_param_names const & ps);
|
|
|
|
level_param_names read_level_params(deserializer & d);
|
|
|
|
inline deserializer & operator>>(deserializer & d, level_param_names & ps) { ps = read_level_params(d); return d; }
|
|
|
|
|
2014-05-16 00:23:36 +00:00
|
|
|
serializer & operator<<(serializer & s, expr const & e);
|
|
|
|
expr read_expr(deserializer & d);
|
|
|
|
inline deserializer & operator>>(deserializer & d, expr & e) { e = read_expr(d); return d; }
|
|
|
|
|
2014-05-26 22:16:29 +00:00
|
|
|
serializer & operator<<(serializer & s, declaration const & d);
|
2015-05-08 21:36:38 +00:00
|
|
|
declaration read_declaration(deserializer & d);
|
2014-05-26 22:16:29 +00:00
|
|
|
|
|
|
|
typedef std::tuple<level_param_names, unsigned, list<inductive::inductive_decl>> inductive_decls;
|
|
|
|
serializer & operator<<(serializer & s, inductive_decls const & ds);
|
|
|
|
inductive_decls read_inductive_decls(deserializer & d);
|
2014-09-22 22:26:41 +00:00
|
|
|
|
|
|
|
void register_macro_deserializer(std::string const & k, macro_definition_cell::reader rd);
|
|
|
|
void initialize_kernel_serializer();
|
|
|
|
void finalize_kernel_serializer();
|
2014-05-16 00:23:36 +00:00
|
|
|
}
|