Documentation

Lean.Meta.Instances

@[reducible, inline]
Equations
Instances For
    Instances For
      @[instance_reducible]
      Equations
      @[instance_reducible]
      Equations
      • discrTree : InstanceTree
      • erased : PHashSet Name
      • classChanges : PHashMap Name (List InstanceChange)

        For each class, the changes of its instances since the import, newest first. Type class resolution depends on the global instances only through the classes it consults, and records their changes instead of the generation of the whole table (RecordedDeps.instClassChanges). Recorded changes are only compared within the module that recorded them, i.e. against states with the same imported instances, so equal changes mean equal instances of the class. Restoring an earlier state (e.g. at the end of a section) restores the changes with it.

      Instances For

        The class an instance's key is rooted at; see Instances.classChanges.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          The changes of the instances of className since the import; see Instances.classChanges.

          Equations
          Instances For

            Adds an imported instance, which is not a change; see Instances.classChanges.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def Lean.Meta.Instances.erase {m : Type → Type} [Monad m] [MonadError m] (d : Instances) (declName : Name) :
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  The global instance entries of a module, preprocessed and stored in its olean so that importing them does not require adding each entry (see registerSimpleScopedEnvExtensionWithSummaries).

                  Instances For

                    Preprocesses the global instance entries the current module exports.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Adds the global entries of all imported modules to the empty instance set d, as addImportedInstanceEntry would.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Lean.Meta.addInstance (declName : Name) (attrKind : AttributeKind) (prio : Nat) :
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def Lean.Meta.registerInstance (declName : Name) (attrKind : AttributeKind) (prio : Nat) :
                              Equations
                              Instances For
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  The changes of the global instances of className; see Instances.classChanges.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      def Lean.Meta.isInstanceCore (env : Environment) (declName : Name) :
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        Equations
                                        Instances For
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For

                                              Default instance support #

                                              Instances For
                                                @[reducible, inline]
                                                Equations
                                                Instances For
                                                  Instances For
                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      def Lean.Meta.addDefaultInstance (declName : Name) (prio : Nat := 0) :
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        def Lean.Meta.getDefaultInstances {m : Type → Type} [Monad m] [MonadEnv m] (className : Name) :
                                                        m (List (Name × Nat))
                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For