Slide 13
Slide 13 text
Koka Effect Aliases
• total ≡
• pure ≡ exn, div
• st(h) ≡ alloc(h), read(h), write(h)
• io ≡ st(io), pure, ndet
Example
• print : string io
−
→ 1
• error : ∀α. string exn
−
−
→ α
• (:=) : ∀α. (ref(h, a), a) write(h)
−
−
−
−
−
→ 1
13