Documentation

StrataDDM.Integration.Lean.OfAstM

Runtime support for converting AST representations back to generated types. Defines the OfAstM error monad and argument-parsing combinators used by the ofAst functions that #strata_gen emits.

class StrataDDM.HasEta (α : Type u) (β : outParam (Type v)) :
Type (max u v)
  • bvar : Natα
  • lambda : Stringβαα
Instances
    @[irreducible]
    def StrataDDM.etaExpand {E : Type u_1} {T : Type u_2} [HasEta E T] (argTypes : Array (String × T)) (provided : Nat) (e : E) :
    E
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def StrataDDM.OfAstM (α : Type u_1) :
      Type u_1
      Equations
      Instances For
        @[implicit_reducible]
        Equations
        @[implicit_reducible]
        instance StrataDDM.instReprOfAstM {α : Type u_1} [Repr α] :
        Equations
        @[implicit_reducible]
        Equations
        • One or more equations did not get rendered due to their size.

        Thrown when an expression is provided but not expected.

        Equations
        Instances For

          Thrown when an expression is provided but not expected.

          Equations
          Instances For
            def StrataDDM.OfAstM.throwExpected {Ann : Type} {α : Type u_1} [Repr Ann] (cat : String) (a : ArgF Ann) :

            Raise error when passed an argument that is not an expression when expression expected.

            Equations
            Instances For
              def StrataDDM.OfAstM.throwExpectedExpr {Ann : Type} {α : Type u_1} [Repr Ann] (a : ArgF Ann) :

              Raise error when passed an argument that is not an expression when expression expected.

              Equations
              Instances For

                Raise error when passed an argument that is not an expression when expression expected.

                Equations
                Instances For
                  Equations
                  Instances For
                    def StrataDDM.OfAstM.throwUnexpectedArgCount {α : Type u_1} (tp : QualifiedIdent) (expected actual : Nat) :
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def StrataDDM.OfAstM.checkTypeArgCount {α : Type u_1} (expected : Nat) (args : Array α) :
                      OfAstM (PLift (args.size = expected))
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        def StrataDDM.OfAstM.checkArgCount {α : Type u_1} (tp : QualifiedIdent) (expected : Nat) (args : Array α) :
                        OfAstM (PLift (args.size = expected))
                        Equations
                        Instances For
                          def StrataDDM.OfAstM.checkEtaExprArgCount {Tp : Type u_1} (tp : QualifiedIdent) (expected : Array (String × Tp)) (args : Array Arg) :
                          OfAstM (PLift (args.size expected.size))
                          Equations
                          Instances For
                            def StrataDDM.OfAstM.ofExpressionM {α : Type} {β : Type u_1} [Repr α] [SizeOf α] (val : ArgF α) (act : (e : ExprF α) → sizeOf e < sizeOf valOfAstM β) :
                            Equations
                            Instances For
                              def StrataDDM.OfAstM.ofTypeM {α : Type} {β : Type u_1} [Repr α] [SizeOf α] (val : ArgF α) (act : (e : TypeExprF α) → sizeOf e < sizeOf valOfAstM β) :
                              Equations
                              Instances For
                                def StrataDDM.OfAstM.ofOperationM {α : Type} {β : Type u_1} [Repr α] [SizeOf α] (val : ArgF α) (act : (o : OperationF α) → sizeOf o < sizeOf valOfAstM β) :
                                Equations
                                Instances For
                                  Equations
                                  Instances For
                                    def StrataDDM.OfAstM.ofAnnNumM {α : Type} [Repr α] :
                                    ArgF αOfAstM (Ann Nat α)
                                    Equations
                                    Instances For
                                      Equations
                                      Instances For
                                        Equations
                                        Instances For
                                          Equations
                                          Instances For

                                            Convert Ann Bool to OperationF

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              def StrataDDM.OfAstM.ofAstBool {α : Type} [Inhabited α] [Repr α] (op : OperationF α) :

                                              Convert OperationF to Ann Bool

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                def StrataDDM.OfAstM.ofOptionM {α β : Type} [Repr α] [SizeOf α] (arg : ArgF α) (act : (e : ArgF α) → sizeOf e < sizeOf argOfAstM β) :
                                                OfAstM (Ann (Option β) α)
                                                Equations
                                                Instances For
                                                  def StrataDDM.OfAstM.ofSeqM {α β : Type} [Repr α] [SizeOf α] (sep : SepFormat) (arg : ArgF α) (act : (e : ArgF α) → sizeOf e < sizeOf argOfAstM β) :
                                                  OfAstM (Ann (Array β) α)
                                                  Equations
                                                  Instances For
                                                    def StrataDDM.OfAstM.matchTypeParamOrType {Ann : Type} {α : Type u_1} [Repr Ann] (a : ArgF Ann) (onTypeParam : Annα) (onType : TypeExprF AnnOfAstM α) :

                                                    Distinguishes between a type parameter (category reference) and a type expression in Init.TypeP, applying the appropriate handler.

                                                    Equations
                                                    Instances For