;;await (wait 2)
let maybeSomeValue =
  match await (fetchData url) with
  | data -> Some data
  | exception JsExn _ -> None
let x = (await 1) + 2
let x = (await (wait 1)) + (await (wait 2))
let () =
  ((let response = await (fetch {js|/users.json|js}) in
    let users = await (response.json ()) in
    let comments = (await ((await (fetch {js|comment.json|js})).json ())).(0) in
    Js.log2 users comments)
  [@res.braces ])
let () = ((await (delay 10))[@res.braces ])
let () = ((await (delay 10); await (delay 20))[@res.braces ])
let forEach = await ((Js.Import Belt.List.forEach)[@a ][@b ])
module M = ((Belt.List)[@res.await ][@a ][@b ])
let f [arity:1]() =
  ((let module M = ((Belt.List)[@res.await ][@a ][@b ]) in M.forEach)
  [@res.braces ])
let () = ((let module M = ((Belt.List)[@res.await ][@a ][@b ]) in M.forEach)
  [@res.braces ])
module type BeltList  = module type of Belt.List
let f [arity:1]() =
  ((let module M = (((Belt.List : BeltList))[@res.await ][@a ][@b ]) in
      M.forEach)
  [@res.braces ])
let () =
  ((let module M = (((Belt.List : BeltList))[@res.await ][@a ][@b ]) in
      M.forEach)
  [@res.braces ])