lean4-htt/library/Init/Lean/EqnCompiler/MatchPattern.lean
Leonardo de Moura a2abbdbf9a chore: fix imports using script
This is just a draft.
```
for f in `find . -name '*.lean'`; do echo $f; gsed "/^import/s/\b\(.\)/\u\1/g" $f > tmp; gsed "/^Import/s/Import/import/g" tmp > $f; done
```
2019-10-04 14:34:58 -07:00

23 lines
697 B
Text

/-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
prelude
import Init.Lean.Attributes
namespace Lean
namespace EqnCompiler
def mkMatchPatternAttr : IO TagAttribute :=
registerTagAttribute `matchPattern "mark that a definition can be used in a pattern (remark: the dependent pattern matching compiler will unfold the definition)"
@[init mkMatchPatternAttr]
constant matchPatternAttr : TagAttribute := default _
@[export lean_has_match_pattern_attribute]
def hasMatchPatternAttribute (env : Environment) (n : Name) : Bool :=
matchPatternAttr.hasTag env n
end EqnCompiler
end Lean