diff --git a/Lama.opam b/Lama.opam index 547173652..9c4ef486f 100644 --- a/Lama.opam +++ b/Lama.opam @@ -14,7 +14,7 @@ bug-reports: "https://github.com/PLTools/Lama/issues" depends: [ "ocaml" { >= "4.13.1" } "ocamlfind" { build } - "camlp5" { >= "8.00.05"} + "camlp5" { >= "8.00.05" } "ostap" { >= "0.5"} "GT" { >= "0.5.1" } ] diff --git a/lama-spec.pdf b/lama-spec.pdf index df804885e..d00a56758 100644 Binary files a/lama-spec.pdf and b/lama-spec.pdf differ diff --git a/runtime/runtime.c b/runtime/runtime.c index 1339e3a8a..1e1ade139 100644 --- a/runtime/runtime.c +++ b/runtime/runtime.c @@ -234,7 +234,7 @@ extern int LtagHash (char *s) { p++; } - if (strcmp(s, de_hash(h)) != 0) { failure("%s <-> %s\n", s, de_hash(h)); } + if (strcmp(s, de_hash(h), 5) != 0) { failure("%s <-> %s\n", s, de_hash(h)); } return BOX(h); } diff --git a/spec/03.04.expressions.tex b/spec/03.04.expressions.tex index db9c875e6..5cd8c7fbf 100644 --- a/spec/03.04.expressions.tex +++ b/spec/03.04.expressions.tex @@ -40,7 +40,7 @@ property ``$e$ is a reference''. The result of assignment operator coincides wit assigns 3 to both "\lstinline|x|" and "\lstinline|y|". \begin{figure}[h] - \renewcommand{\Ref}[1]{\mathcal{R}\,({#1})} + \newcommand{\Ref}[1]{\mathcal{R}\,({#1})} \renewcommand{\arraystretch}{4} \[ \begin{array}{cc} diff --git a/spec/08.standard_library.tex b/spec/08.standard_library.tex index 5ca12f9f5..843d65e25 100644 --- a/spec/08.standard_library.tex +++ b/spec/08.standard_library.tex @@ -238,7 +238,7 @@ The function takes an accumulator and a pair key-value. The bindings are enumera Sets are immutable structures with the following interface: -\descr{\lstinline|fun emptySet (f)|}{Creates an empty set. An argument is a comparison function, which returns zero, positive or negative integer values depending on +\descr{\lstinline|fun emptySet (compare)|}{Creates an empty set. An argument is a comparison function, which returns zero, positive or negative integer values depending on the order of its arguments.} \descr{\lstinline|fun isEmptySet (m)|}{Returns true if an argument set is empty.} @@ -259,7 +259,7 @@ there is no such element and non-zero otherwise.} \descr{\lstinline|fun diff (a, b)|}{Returns a difference between sets "\lstinline|a|" and "\lstinline|b|" (a set of those elements of "\lstinline|a|" which are not in "\lstinline|b|") as a new set.} -\descr{\lstinline|fun listSet (l)|}{Converts a list into a set. } +\descr{\lstinline|fun listSet (l, compare)|}{Converts a list into a set. The second argument is a comparison function as per \lstinline|emptySet|.} \descr{\lstinline|fun iterSet (f, s)|}{Applied a function "\lstinline|f|" to each element of the set "\lstinline|s|". The elements are enumerated in ascending order.}