https://github.com/diku-dk/sml-uref
Standard ML package for unifiable references
https://github.com/diku-dk/sml-uref
smlpkg
Last synced: 4 months ago
JSON representation
Standard ML package for unifiable references
- Host: GitHub
- URL: https://github.com/diku-dk/sml-uref
- Owner: diku-dk
- License: mit
- Created: 2020-04-11T12:52:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-01T08:25:42.000Z (over 2 years ago)
- Last Synced: 2025-07-02T10:51:07.468Z (12 months ago)
- Topics: smlpkg
- Language: Standard ML
- Size: 8.79 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sml-uref [](https://github.com/diku-dk/sml-uref/actions)
Standard ML package for unifiable references.
## Overview of MLB files
- `lib/github.com/diku-dk/sml-uref/uref.mlb`:
- **signature** [`UREF`](lib/github.com/diku-dk/sml-uref/uref.sig)
- **structure** `URef`
## Use of the package
This library is set up to work well with the SML package manager
[smlpkg](https://github.com/diku-dk/smlpkg). To use the package, in
the root of your project directory, execute the command:
```
$ smlpkg add github.com/diku-dk/sml-uref
```
This command will add a _requirement_ (a line) to the `sml.pkg` file in your
project directory (and create the file, if there is no file `sml.pkg`
already).
To download the library into the directory
`lib/github.com/diku-dk/sml-uref`, execute the command:
```
$ smlpkg sync
```
You can now reference the `mlb`-file using relative paths from within
your project's `mlb`-files.
Notice that you can choose either to treat the downloaded package as
part of your own project sources (vendoring) or you can add the
`sml.pkg` file to your project sources and make the `smlpkg sync`
command part of your build process.
## Author
The `URef` structure is written by Fritz Henglein. The present version
uses union-by-rank and path-compression for the `find` operation. On
some systems, such as SML/NJ, better results may be obtained by
implementing `find` using path-halving, which can be implemented in a
tail-recursive fashion.