Documentation

DY.Trace.Monad

Equations
Instances For
    @[instance_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    @[instance_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    def DY.Traceful.run {a : Type} [ExecTraceTypes] (x : Traceful a) (tr : ExecTrace) :
    Option a × { trOut : ExecTrace // tr trOut }
    Equations
    Instances For
      def DY.Traceful.mk [ExecTraceTypes] {α : Type} (f : (tr : ExecTrace) → Option α × { trOut : ExecTrace // tr trOut }) :
      Equations
      Instances For
        @[implicit_reducible]
        def DY.Err (α : Type u_1) :
        Type u_1
        Equations
        Instances For
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          Equations
          theorem DY.Traceful.run_mk [ExecTraceTypes] {α : Type} (f : (tr : ExecTrace) → Option α × { trOut : ExecTrace // tr trOut }) :
          (mk f).run = f
          theorem DY.Traceful.run_pure {a : Type} [ExecTraceTypes] (x : a) (tr : ExecTrace) :
          (pure x).run tr = (some x, tr, )
          theorem DY.Traceful.run_bind {a b : Type} [ExecTraceTypes] (x : Traceful a) (f : aTraceful b) (tr : ExecTrace) :
          (x >>= f).run tr = match x.run tr with | (opt_x, tr_1) => match opt_x with | some x => match (f x).run tr_1.val with | (opt_y, tr_2) => (opt_y, tr_2.val, ) | none => (none, tr_1)