The syntax in this language is confusing.
fun bar a =
print (Int.toString a);
0
compiles. No idea why emacs indents the 0 though.
fun bar a =
print (Int.toString a)
0
Throws an error.
Error: operator is not a function [tycon mismatch]
operator: unit
in expression:
(print (Int.toString a)) 0
fun foo a =
if a < 0
then
0
else
0
compiles.
fun foo a =
if a < 0
then
print (Int.toString a);
0
else
0
throws an error.
syntax error: replacing SEMICOLON with EQUALOP
Wat?
I can't make any sense of this.