I don't know how to open and run sml files with PolyML

839 views Asked by At

I'm completely new to SML and I don't understand what am I supposed to do in order to create, edit, compile and run an sml file with PolyML. I'm using Windows and I don't know if I need to download another IDE, or some developement kit like for Java.

I'd like to create files where some functions are defined and then use them by the terminal.

1

There are 1 answers

0
sshine On BEST ANSWER

You can edit your SML code in any programming editor you like. Some have better support for syntax highlighting than others. Finding a good editor is a matter of exploration and personal taste and is not suitable for answering here.

Save your SML code to a file that ends in .sml and do one of the following two:

  • Either, in the terminal enter the following command:

    poly --use yourfile.sml
    
  • Or, by first typing poly and inside the REPL type the following:

    use "yourfile.sml";