Commit 1b8a027e authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-05-17 22:06:36 by afrisch] Empty log message

Original author: afrisch
Date: 2005-05-17 22:06:36+00:00
parent 1fc48aed
......@@ -87,6 +87,13 @@ let exn_int_of =
Value.Pair (
Value.Atom (Atoms.V.mk_ascii "Invalid_argument"),
Value.string_latin1 "int_of"))
let exn_char_of =
Value.CDuceExn (
Value.Pair (
Value.Atom (Atoms.V.mk_ascii "Invalid_argument"),
Value.string_latin1 "char_of"))
let exn_float_of =
Value.CDuceExn (
Value.Pair (
......@@ -141,6 +148,15 @@ binary_op_cst ">"
Value.vbool (Value.compare v1 v2 > 0));;
(* I/O *)
register_fun "char_of_int"
int (Types.char Chars.any)
(function
| Value.Integer x ->
(try Value.Char (Chars.V.mk_int (Intervals.V.get_int x))
with Failure _ -> raise exn_int_of)
| _ -> assert false);;
register_fun "string_of"
any string_latin1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment