use int.Int
use coma.Std

let postIncr [@coma:extspec] (&r: int) (return (p: int)) =
  (fun (v: int) ->
    (! [ &r <- r+1 ] break)
    [ break -> { r = v+1 } (! return {v}) ]) {r}

let postIncrLet [@coma:extspec] (&r: int) (return (p: int)) =
  (! [&r <- r+1] break)
  [ break -> { r = v+1 } (! return {v}) ]
  [ v: int = r ]

let postIncrPro [@coma:extspec]
      (&r: int) [v: int = r] {} (return (p: int) {r = v + 1} {p = v})
= [ &r <- r+1 ] return {v}

