fix(frontends/lean): add missing files
This commit is contained in:
parent
b9c62af37d
commit
325d590bd0
2 changed files with 34 additions and 0 deletions
21
src/frontends/lean/pattern_attribute.cpp
Normal file
21
src/frontends/lean/pattern_attribute.cpp
Normal 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() {
|
||||
}
|
||||
}
|
||||
13
src/frontends/lean/pattern_attribute.h
Normal file
13
src/frontends/lean/pattern_attribute.h
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue