chore(kernel): fix style and lua bindings

This commit is contained in:
Leonardo de Moura 2014-09-17 18:25:15 -07:00
parent ea1bae0143
commit 243f80231a
3 changed files with 3 additions and 2 deletions

View file

@ -29,7 +29,7 @@ class type_checker;
class environment;
class certified_declaration;
typedef std::function<bool(name const &)> extra_opaque_pred;
typedef std::function<bool(name const &)> extra_opaque_pred; // NOLINT
extra_opaque_pred const & no_extra_opaque();
/**

View file

@ -1842,8 +1842,8 @@ static int mk_type_checker(lua_State * L) {
return push_type_checker_ref(L, std::make_shared<type_checker>(to_environment(L, 1), to_name_generator(L, 2)));
} else {
optional<module_idx> mod_idx; bool memoize; name_set extra_opaque;
extra_opaque_pred pred([=](name const & n) { return extra_opaque.contains(n); });
get_type_checker_args(L, 3, mod_idx, memoize, extra_opaque);
extra_opaque_pred pred([=](name const & n) { return extra_opaque.contains(n); });
auto t = std::make_shared<type_checker>(to_environment(L, 1), to_name_generator(L, 2),
mk_default_converter(to_environment(L, 1), mod_idx, memoize, pred),
memoize);

View file

@ -56,5 +56,6 @@ assert(not pcall(function() print(tc2:check(id_1(Type, a))) end))
assert(tc2:whnf(id_2(Type, a)) == a)
assert(tc2:whnf(id_2(Type, id_2(Type, a))) == a)
local tc3 = type_checker(env, name_generator("foo"), {extra_opaque=name_set("id")})
print(tc3:whnf(id_2(Type, id_2(Type, a))))
assert(tc3:whnf(id_2(Type, id_2(Type, a))) == id_2(Type, id_2(Type, a)))
print(id_2(Type, id_2(Type, a)))