chore: add MutualDef.lean

This commit is contained in:
Leonardo de Moura 2020-09-01 14:18:10 -07:00
parent 095e07d52d
commit dfd344c9eb
2 changed files with 25 additions and 3 deletions

View file

@ -8,6 +8,7 @@ import Lean.Elab.DeclUtil
import Lean.Elab.Definition
import Lean.Elab.Inductive
import Lean.Elab.Structure
import Lean.Elab.MutualDef
namespace Lean
namespace Elab
@ -255,9 +256,6 @@ private def isMutualDef (stx : Syntax) : Bool :=
declKind == `Lean.Parser.Command.abbrev ||
declKind == `Lean.Parser.Command.theorem
private def elabMutualDef (elems : Array Syntax) : CommandElabM Unit :=
throwError "WIP mutual def"
private def isMutualPreambleCommand (stx : Syntax) : Bool :=
let k := stx.getKind;
k == `Lean.Parser.Command.variable ||

View file

@ -0,0 +1,24 @@
/-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Lean.Elab.Command
namespace Lean
namespace Elab
namespace Term
def elabMutualDef (vars : Array Expr) (ds : Array Syntax) : TermElabM Unit := do
throwError "WIP mutual def"
end Term
namespace Command
def elabMutualDef (ds : Array Syntax) : CommandElabM Unit :=
runTermElabM none fun vars => Term.elabMutualDef vars ds
end Command
end Elab
end Lean