From 201a34e9b8799a79bee2eabf22e9299cd605b68a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20H=C3=B6glund?= Date: Tue, 16 Nov 2021 21:34:02 +0000 Subject: [PATCH] Remove use of physical equality on characters The meaning of `!=` is [implementation-dependent](https://www.ocaml.org/api/Stdlib.html) in OCaml. This seems undesirable for a reference interpreter. This PR switching to `<>` which uses structural (non) equality. --- interpreter/exec/int.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpreter/exec/int.ml b/interpreter/exec/int.ml index ec23208d8e..375475dfb2 100644 --- a/interpreter/exec/int.ml +++ b/interpreter/exec/int.ml @@ -284,7 +284,7 @@ struct let of_string_u s = let n = of_string s in - require (s.[0] != '+' && s.[0] != '-'); + require (s.[0] <> '+' && s.[0] <> '-'); n (* String conversion that groups digits for readability *)