1structure UniversalType :> UniversalType =
2struct
3
4  (* stolen from MLton webpage: http://mlton.org/UniversalType *)
5type t = exn
6
7fun 'a embed () = let
8  exception E of 'a
9  fun project (e: t): 'a option =
10      case e of
11        E a => SOME a
12      | _ => NONE
13in
14  (E, project)
15end
16end (* struct *)
17