fix(frontends/lean): add missing files

This commit is contained in:
Leonardo de Moura 2016-08-08 08:16:31 -07:00
parent b9c62af37d
commit 325d590bd0
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,21 @@
/*
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "library/attribute_manager.h"
namespace lean {
bool has_pattern_attribute(environment const & env, name const & d) {
return has_attribute(env, "pattern", d);
}
void initialize_pattern_attribute() {
register_attribute(basic_attribute("pattern", "mark that a definition can be used in a pattern"
"(remark: the dependent pattern matching compiler will unfold the definition)"));
}
void finalize_pattern_attribute() {
}
}

View file

@ -0,0 +1,13 @@
/*
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "kernel/environment.h"
namespace lean {
bool has_pattern_attribute(environment const & env, name const & d);
void initialize_pattern_attribute();
void finalize_pattern_attribute();
}