# Example of existentials.
#
# Except for the "interface" Exists s. s * ..., we need only one type annotation.

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 zero, toInt (fromInt 30))
      end end end
   end
end : int * int
;
