aboutsummaryrefslogtreecommitdiff
path: root/checker/validate.ml
diff options
context:
space:
mode:
authorPierre Roux2019-02-20 18:00:04 +0100
committerPierre Roux2019-11-01 10:20:51 +0100
commit6133877fc097412233a60740fdf94374abb79559 (patch)
tree26655b276f177cc77f108524278eb620e03c97c1 /checker/validate.ml
parentf0bf1511e59e528e090a87cfcc220f93c2431ecd (diff)
Add primitive floats to checker
Diffstat (limited to 'checker/validate.ml')
-rw-r--r--checker/validate.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/checker/validate.ml b/checker/validate.ml
index 178bb4c527..678af9f2d5 100644
--- a/checker/validate.ml
+++ b/checker/validate.ml
@@ -87,6 +87,7 @@ let rec val_gen v ctx o = match v with
| Dyn -> val_dyn ctx o
| Proxy { contents = v } -> val_gen v ctx o
| Uint63 -> val_uint63 ctx o
+ | Float64 -> val_float64 ctx o
(* Check that an object is a tuple (or a record). vs is an array of
value representation for each field. Its size corresponds to the
@@ -138,6 +139,10 @@ and val_uint63 ctx o =
if not (Uint63.is_uint63 o) then
fail ctx o "not a 63-bit unsigned integer"
+and val_float64 ctx o =
+ if not (Float64.is_float64 o) then
+ fail ctx o "not a 64-bit float"
+
let print_frame = function
| CtxType t -> t
| CtxAnnot t -> t