Documentation

Lean.Meta.Match.MatcherInfo

  • hName? : Option Name

    some h if the discriminant is annotated with h:

Instances For
    Equations
      Instances For
        def Lean.Meta.Match.Overlaps.insert (o : Overlaps) (overlapping overlapped : Nat) :
        Equations
          Instances For
            Equations
              Instances For

                Information about the parameter structure for the alternative of a matcher or splitter.

                • numFields : Nat

                  Actual fields (not including discr eqns)

                • numOverlaps : Nat

                  Overlap assumption (for splitters only)

                • hasUnitThunk : Bool

                  Whether this alternative has an artificial Unit parameter

                Instances For

                  Information about the structure of a matcher declaration

                  • numParams : Nat

                    Number of parameters

                  • numDiscrs : Nat

                    Number of discriminants

                  • altInfos : Array AltParamInfo

                    Parameter structure information for each alternative

                  • uElimPos? : Option Nat

                    uElimPos? is some pos when the matcher can eliminate in different universe levels, and pos is the position of the universe level parameter that specifies the elimination universe. It is none if the matcher only eliminates into Prop.

                  • discrInfos : Array DiscrInfo

                    discrInfos[i] = { hName? := some h } if the i-th discriminant was annotated with h :.

                  • overlaps : Overlaps

                    (Conservative approximation of) which alternatives may overlap another.

                  Instances For
                    Equations
                      Instances For
                        Equations
                          Instances For
                            Instances For
                              Equations
                                Instances For
                                  Equations
                                    Instances For
                                      def Lean.Meta.Match.addMatcherInfo {m : TypeType} [Monad m] [MonadEnv m] (matcherName : Name) (info : MatcherInfo) :
                                      Equations
                                        Instances For
                                          Equations
                                            Instances For
                                              def Lean.Meta.getMatcherInfo? {m : TypeType} [Monad m] [MonadEnv m] (declName : Name) :
                                              Equations
                                                Instances For
                                                  @[export lean_is_matcher]
                                                  def Lean.Meta.isMatcherCore (env : Environment) (declName : Name) :
                                                  Equations
                                                    Instances For
                                                      def Lean.Meta.isMatcher {m : TypeType} [Monad m] [MonadEnv m] (declName : Name) :
                                                      Equations
                                                        Instances For
                                                          Equations
                                                            Instances For
                                                              Equations
                                                                Instances For
                                                                  def Lean.Meta.isMatcherApp {m : TypeType} [Monad m] [MonadEnv m] (e : Expr) :
                                                                  Equations
                                                                    Instances For