diff options
Diffstat (limited to '')
| -rw-r--r-- | lib/concepts/Value.ml | 6 | ||||
| -rw-r--r-- | lib/concepts/Value.mli | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/concepts/Value.ml b/lib/concepts/Value.ml index 3e57717..65a0439 100644 --- a/lib/concepts/Value.ml +++ b/lib/concepts/Value.ml @@ -1,3 +1,3 @@ -type value - = String of string - | Integer of int +type value = String of string | Integer of int + +let to_string = function String s -> s | Integer n -> Int.to_string n diff --git a/lib/concepts/Value.mli b/lib/concepts/Value.mli index 6cb09ad..9644443 100644 --- a/lib/concepts/Value.mli +++ b/lib/concepts/Value.mli @@ -1,4 +1,5 @@ -(** A tagged concrete value *) -type value - = String of string - | Integer of int +(** a tagged concrete value *) +type value = String of string | Integer of int + +(** given a value, return a string representation of it *) +val to_string : value -> string |
