Skip to content

Instantly share code, notes, and snippets.

Computation Expression Problems

1. The translation rule of do! e;

In the language specification, the translation rule of do! e; is defined as follows:

T(do! e;, V, C, q) = T(let! () = src(e) in b.Return(), V, C, q)

And the signature of Return is 'a -> M<'a>, so the type of do! e; results M<unit>.