»nil« seems to be a reserved constructor word in PolyML
authorhaftmann
Sat, 21 May 2022 14:07:24 +0000
changeset 75456 160c9c18a707
parent 75455 91c16c5ad3e9
child 75458 4117491aa7fe
»nil« seems to be a reserved constructor word in PolyML
src/Tools/Code/code_ml.ML
--- a/src/Tools/Code/code_ml.ML	Tue May 17 14:10:14 2022 +0100
+++ b/src/Tools/Code/code_ml.ML	Sat May 21 14:07:24 2022 +0000
@@ -891,9 +891,13 @@
   #> Code_Target.set_printings (Type_Constructor ("fun",
     [(target_SML, SOME (2, fun_syntax)), (target_OCaml, SOME (2, fun_syntax))]))
   #> fold (Code_Target.add_reserved target_SML) ML_Syntax.reserved_names
-  #> fold (Code_Target.add_reserved target_SML)
-      ["ref" (*rebinding is illegal*), "o" (*dictionary projections use it already*),
-        "Fail", "div", "mod" (*standard infixes*), "IntInf"]
+  #> fold (Code_Target.add_reserved target_SML) [
+      "ref", (*rebinding is illegal*)
+      "o", (*dictionary projections use it already*)
+      "nil", (*predefined constructor*)
+      "Fail",
+      "div", "mod", (*standard infixes*)
+      "IntInf"]
   #> fold (Code_Target.add_reserved target_OCaml) [
       "and", "as", "assert", "begin", "class",
       "constraint", "do", "done", "downto", "else", "end", "exception",