Skip to content
A nascent, in progress library of utility modules for SML (compatible with, and using extensions offered by SML/NJ)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cats
tests
.gitignore
README.org
array-slice-plus.sml
collection.sml
dict-pairs.sml
file.sml
graph.sml
iou.sml
list-plus.sml
number.sml
ordered.sml
pair.sml
petitest.sml
rand-c.sml
random-plus.sml
repl.sml
shell.sml
stack.sml
string-plus.sml
utils.cm
utils.mlb

README.org

SML Utility Modules

This is an ongoing project, comprised of modules facilitating functionality I find useful or interesting during the course of my experiments with SML.

Library description

sources.cm
The SML/NJ Compilation Manager (thus .cm) description file that packages all the modules as a library. Users can include this library in their own projects in two ways:
  1. For nontrivial projects, add it as member of the description file for the project, as described in the SML/NJ CM manual (pdf), p. 6.
  2. For simple projects, the user can make this library available directly from the SML source file by making the member modules available for auto-loading. To do this, call CM.autoload "<path here>/sml-utils/sources.cm"; in the source file before calling the library’s modules.
array-slice-plus.sml
Defines the module ArraySlicePlus, which extends the ArraySlice module from the basis library, enabling more declarative use of array slices. You can see an example of this module in action in my study of in-place quicksort.
dict-pairs.sml
Defines the module DictPairs, providing functions on pairs of lists used as a key-value store.
collection.sml
Strives to define a common interface for collection types.
file.sml
Defines the module File, which will collect functions operating on files.
graph.sml
A parametric graph library, which can define and operate on graphs, digraphs, or multi-graphs, depending on the parameters supplied.
iou.sml
Defines the module IOU, which will collect input/output utilities. It’s barren at the moment.
list-plus.sml
Defines the module ListPlus, which extends the List module in the SML basis library.
number.sml
Defines a common interface for numbers (ints, reals etc).
ordered.sml
Defines modules for ordered types, including sub-types like bounded orders, enumerable orders, and cyclical orders.
pair.sml
Defines the module Pair, providing functions on tuples, including ways of constructing, mapping into, accessing, and displaying tuples.
petitest.sml
Defines the module PetiTest, a very petite tool for testing. Likely the most petite possible.
rand-c.sml
Defines the module RandC, providing random operations on any collection that can be transformed to and from a list.
random-plus.sml
Defines modules facilitating the generation of simple random values.
shell.sml
Defines the module Shell, which provides a few functions for moving around directories and listing files.
stack.sml
Defines modules for monomorphic and polymorphic stacks.
You can’t perform that action at this time.