module Frduino.Genlet.For_lib.Async
open Stdlib.Asyncseq
open Frduino
open Frduino.Genlet
type env () =
interface Lib.Async.env
type clock() =
interface Lib.Async.clock
type StdenvBuilder() =
interface Lib.Async.StdenvBuilder with
override __.clock (_: Lib.Async.env): Lib.Async.clock =
new clock()
type Builder() =
interface Lib.Async.Builder with
override __.sleep (t: Lib.Async.clock): expr<int> -> Asyn<unit> =
fun amount ->
ignore t
let amount = amount :?> CodeExpr<int>
new CodeAsyn<unit>(u = $"delay({amount.n})")