Document class name: sml Class members: *.smlWhen it prompts for syntax file name, select sml.syn and click on "Enable syntax highlighting".
val x = if 2 < 3 then 4 else 5;Save it to test.sml. When you go to save, be careful to have "Save as Type" set to "All files". TextPad has a habit of saving to Text files in which case it would save it as test.sml.txt. When you save it, you should see colors appear for the keywords.
Description: sml files Wildcards: *.smlYou can then click on the "Move up" button several times to move it to the top so that TextPad will default to the sml file type. Be sure to click on Apply and OK.
There is still a problem to deal with. When you load a legal sml file, the command above works fine. But when you try to load a file that has some kind of syntax error, you'll find that the window quickly collapses before you can see the error. I recommend the following. Repeat the steps above to create a second command. Do everything the same except leave the "Capture output" box checked (you want to capture output when there is an error). You should use this version when you have an error message that you want to see. The output will be displayed in the "Tool Output" window. When you go to Preferences/Tools and see your list of tools, you'll now see "sml" listed twice. Click on the second one and you'll have the option to rename it something like "sml error".
For those of you using Windows, you'll find a great bonus. You can use the arrow keys inside of the ML interpreter. For example, if you want to get the expression you typed previously, just hit the up-arrow key. You can hit the up-arrow key several times in a row to get an even earlier expression. Also, If you're typing in a long expression and you notice a mistake towards the beginning, you can use the left-arrow key to position to the error and correct it, then use the right-arrow key to get back to the end of the expression. You can even use the Home and End keys to go to the beginning of the current line or the end of the current line.
In the attu instructions you will see a description of some environment variables that you might want to set. If you have set up the SML tool, you can go to Configure, Preferences, Tools, Sml. You should see this option:
Parameters: $FileChange this to the following to get the suggested settings for the environment variables:
Parameters: -Cprint.depth=20 -Cprint.length=1000 $FileIf anyone has problems, post a message to the message board or email Stuart and we'll try to figure out what is going on.