Output is truncated with #-signs in the REPL

This is just an output restriction (yes, it’s confusing) – by default the depth of value printouts in the top-level (interactive shell) is limited to a fairly small number (i.e. 5). The skipped parts are printed with #. You can override this depth – at least, in SML-NJ – with printDepth variable: Control.Print.printDepth := 1024; … Read more

Why can’t I compare reals in Standard ML?

Why doesn’t 1.0 = 2.0 work? Isn’t real an equality type? No. The type variable ”Z indicates that the operands of = must have equality types. Why won’t reals in patterns work […]? Pattern matching relies implicitly on testing for equality. The cryptic error message syntax error: inserting EQUALOP indicates that the SML/NJ parser does … Read more