| 1 | open Core |
| 2 | module Unix = Core_unix |
| 3 | module Time = Time_float_unix |
| 4 | |
| 5 | (* Examples from ../README.md *) |
| 6 | |
| 7 | let _basic_use = [%sexp { a = "hello"; b = (Time.now () : Time.t) }] |
| 8 | |
| 9 | let _expressions_with_their_evaluations ~x ~y ~z = |
| 10 | [%sexp ~~(x : int), (y + z : int), "literal"] |
| 11 | ;; |
| 12 | |
| 13 | let _recomended_use_for_errors ~tmpfile ~dst = |
| 14 | try Unix.rename ~src:tmpfile ~dst with |
| 15 | | exn -> |
| 16 | raise_s |
| 17 | [%sexp |
| 18 | "Error while renaming file" |
| 19 | , { source = (tmpfile : string); dest = (dst : string); exn : exn }] |
| 20 | ;; |