smlmlpolyml

Is there a way to display every function of a SML package/library? I am using PolyML


I want to list every function of a SML library. Is there something like an help command?

For example:

Is there a way to see this list in the PolyML terminal?

I need to view it on the terminal without using google. I can't use internet during the exam and I can't bring notes.


Solution

  • You can type open TextIO; in the REPL. This will import the content of the module into your current scope, but in the REPL it will also have the side-effect of printing what it imported. You may not be interested in the scope being updated like that, so it may be wise to restart the REPL afterwards if you intend to use it again.

    $ poly
    Poly/ML 5.7.1 Release
    > open TextIO;
    structure StreamIO: TEXT_STREAM_IO
    val canInput = fn: instream * int -> int option
    val closeIn = fn: instream -> unit
    val closeOut = fn: outstream -> unit
    ...