When to use semicolons in SML?
I know that semicolons are used as terminators in REPL. But I'm confused about when to use them in a source file. For example it is not necessary after val x = 1 . But if I omit it after use "foo.sml" , the compiler will complain about it. Then, what are the rules on using semicolons? Semicolons are used for a number of syntactic entities in SML. They are normally used to create sequences of, e.g., expressions or declarations. Here's a link to the SML grammar: http://www.mpi-sws.org/~rossberg/sml.html In your case, you are interested in the semicolon for declarations (the dec class). Note that