module Horror

  use ref.Ref

  let bad (ghost i : int) : ref int
    ensures { !result = i }
  = let r = ref 0 in
    r := i;
    r

  let good (ghost i : int) : int
    ensures { result = i }
  = !(bad i)

end
