File: .lake/packages/lean4/src/lean/Lean/Elab/Deriving/Util.lean

full_name: Lean.Elab.Deriving.implicitBinderF
code: def implicitBinderF 
goal: Lean.Parser.Parser

full_name: Lean.Elab.Deriving.instBinderF
code: def instBinderF     
goal: Lean.Parser.Parser

full_name: Lean.Elab.Deriving.explicitBinderF
code: def explicitBinderF 
goal: Lean.Parser.Parser

full_name: Lean.Elab.Deriving.mkInductArgNames
code: /-- Make fresh, hygienic names for every parameter and index of an inductive declaration.

For example, `inductive Foo {α : Type} : Nat → Type` will give something like ``#[`α✝, `a✝]``. -/
def mkInductArgNames (indVal : InductiveVal) : TermElabM (Array Name) 
goal: Lean.Elab.TermElabM (Array Lean.Name)

full_name: Lean.Elab.Deriving.mkInductiveApp
code: /-- Return the inductive declaration's type applied to the arguments in `argNames`. -/
def mkInductiveApp (indVal : InductiveVal) (argNames : Array Name) : TermElabM Term 
goal: Lean.Elab.TermElabM Lean.Term

full_name: Lean.Elab.Deriving.mkImplicitBinders
code: /-- Return implicit binder syntaxes for the given `argNames`. The output matches `implicitBinder*`.

For example, ``#[`foo,`bar]`` gives `` `({foo} {bar})``. -/
def mkImplicitBinders (argNames : Array Name) : TermElabM (Array (TSyntax ``Parser.Term.implicitBinder)) 
goal: Lean.Elab.TermElabM (Array (Lean.TSyntax `Lean.Parser.Term.implicitBinder))

full_name: Lean.Elab.Deriving.mkInstImplicitBinders
code: /-- Return instance binder syntaxes binding `className α` for every generic parameter `α`
of the inductive `indVal` for which such a binding is type-correct. `argNames` is expected
to provide names for the parameters (see `mkInductArgNames`). The output matches `instBinder*`.

For example, given `inductive Foo {α : Type} (n : Nat) : (β : Type) → Type`, where `β` is an index,
invoking ``mkInstImplicitBinders `BarClass foo #[`α, `n, `β]`` gives `` `([BarClass α])``. -/
def mkInstImplicitBinders (className : Name) (indVal : InductiveVal) (argNames : Array Name) : TermElabM (Array Syntax) 
goal: Lean.Elab.TermElabM (Array Lean.Syntax)

full_name: Lean.Elab.Deriving.Context
code: structure Context where
  typeInfos   : Array InductiveVal
  auxFunNames : Array Name
  usePartial  : Bool
goal: Type

full_name: Lean.Elab.Deriving.Context.usePartial
code: structure Context where
  typeInfos   : Array InductiveVal
  auxFunNames : Array Name
  usePartial  : Bool
goal: Bool

full_name: Lean.Elab.Deriving.Context.auxFunNames
code: structure Context where
  typeInfos   : Array InductiveVal
  auxFunNames : Array Name
  usePartial  : Bool
goal: Array Lean.Name

full_name: Lean.Elab.Deriving.Context.typeInfos
code: structure Context where
  typeInfos   : Array InductiveVal
  auxFunNames : Array Name
  usePartial  : Bool
goal: Array Lean.InductiveVal

full_name: Lean.Elab.Deriving.mkContext
code: def mkContext (fnPrefix : String) (typeName : Name) : TermElabM Context 
goal: Lean.Elab.TermElabM Lean.Elab.Deriving.Context

full_name: Lean.Elab.Deriving.mkLocalInstanceLetDecls
code: def mkLocalInstanceLetDecls (ctx : Context) (className : Name) (argNames : Array Name) : TermElabM (Array (TSyntax ``Parser.Term.letDecl)) 
goal: Lean.Elab.TermElabM (Array (Lean.TSyntax `Lean.Parser.Term.letDecl))

full_name: Lean.Elab.Deriving.mkLet
code: def mkLet (letDecls : Array (TSyntax ``Parser.Term.letDecl)) (body : Term) : TermElabM Term 
goal: Lean.Elab.TermElabM Lean.Term

full_name: Lean.Elab.Deriving.mkInstanceCmds
code: def mkInstanceCmds (ctx : Context) (className : Name) (typeNames : Array Name) (useAnonCtor := true) : TermElabM (Array Command) 
goal: Lean.Elab.TermElabM (Array Lean.Command)

full_name: Lean.Elab.Deriving.mkDiscr
code: def mkDiscr (varName : Name) : TermElabM (TSyntax ``Parser.Term.matchDiscr) 
goal: Lean.Elab.TermElabM (Lean.TSyntax `Lean.Parser.Term.matchDiscr)

full_name: Lean.Elab.Deriving.Header.binders
code: structure Header where
  binders     : Array (TSyntax ``Parser.Term.bracketedBinder)
  argNames    : Array Name
  targetNames : Array Name
  targetType  : Term
goal: Array (Lean.TSyntax `Lean.Parser.Term.bracketedBinder)

full_name: Lean.Elab.Deriving.Header.targetNames
code: structure Header where
  binders     : Array (TSyntax ``Parser.Term.bracketedBinder)
  argNames    : Array Name
  targetNames : Array Name
  targetType  : Term
goal: Array Lean.Name

full_name: Lean.Elab.Deriving.Header
code: structure Header where
  binders     : Array (TSyntax ``Parser.Term.bracketedBinder)
  argNames    : Array Name
  targetNames : Array Name
  targetType  : Term
goal: Type

full_name: Lean.Elab.Deriving.Header.argNames
code: structure Header where
  binders     : Array (TSyntax ``Parser.Term.bracketedBinder)
  argNames    : Array Name
  targetNames : Array Name
  targetType  : Term
goal: Array Lean.Name

full_name: Lean.Elab.Deriving.Header.targetType
code: structure Header where
  binders     : Array (TSyntax ``Parser.Term.bracketedBinder)
  argNames    : Array Name
  targetNames : Array Name
  targetType  : Term
goal: Lean.Term

full_name: Lean.Elab.Deriving.mkHeader
code: def mkHeader (className : Name) (arity : Nat) (indVal : InductiveVal) : TermElabM Header 
goal: Lean.Elab.TermElabM Lean.Elab.Deriving.Header

full_name: Lean.Elab.Deriving.mkDiscrs
code: def mkDiscrs (header : Header) (indVal : InductiveVal) : TermElabM (Array (TSyntax ``Parser.Term.matchDiscr)) 
goal: Lean.Elab.TermElabM (Array (Lean.TSyntax `Lean.Parser.Term.matchDiscr))