Skip to content

Conversation

spiessimon
Copy link

This PR adds several improvements to the printing of OxCaml values, specifically:

  1. Strings are printed analogous to the format specifier %S in OCaml, meaning as properly escaped OCaml source strings. In OCaml, the corresponding function is Bytes.unsafe_escape from the standard library.
  2. Unboxed integers are printed with a # as the prefix.
  3. For negative unboxed floats and unboxed integers, the minus is printed before instead of after the hash to match the OxCaml source syntax.
  4. For floats that are integers, a trailing .0 is added instead of just . for more uniform display.
  5. Byte-size small integers are printed as decimal numbers rather than characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant