#
# Example of a program violating data abstraction
#
let module = 
  pack int with
    (0,
     (fun f (x) is x end,
      fun g (x) is x end))
  end : Exists s. s * ((int -> s) * (s -> int))
in
   open module as t with impl in
      let zero = fst impl in
      let fromInt = fst (snd impl) in
      let toInt = snd (snd impl) in
         toInt ((fromInt 30) + 1)     # Violates data abstraction!
      end end end
   end
end : int
;
