def Source.host
import bend-trace-context@0.2.0.0/generation.bend as Generationimport Base
import bend-trace-context@0.2.0.0/entropy.bend as Entropy
28# The host source as the machine reads it: each read returns one word result
29# from Entropy.read_u32, and the state is Unit because the host keeps none.
30def Source.host(state: Unit) -> IO(Unit & Result<&1, &1, U32 & String, U32>):
31 IO.bind(Result<&1, &1, U32 & String, U32>, Unit & Result<&1, &1, U32 & String, U32>,
32 Entropy.read_u32(), word => IO.pure(Unit & Result<&1, &1, U32 & String, U32>, (state, word)))