(* "Single-threaded" threads *) module AThread : sig type thread qualifier A val fork : (unit -o unit) -> thread val kill : thread -> unit val delay : int -> unit val print : thread -> thread end = struct open Thread let fork = (fork :> (unit -o unit) -> thread) let print (th: thread) = print th; th end