An open API service indexing awesome lists of open source software.

https://github.com/darinm223/generic

Port of generic library to smlpkg (targeting MLton, PolyML, MLKit, and SMLNJ v110.99.4)
https://github.com/darinm223/generic

Last synced: 7 months ago
JSON representation

Port of generic library to smlpkg (targeting MLton, PolyML, MLKit, and SMLNJ v110.99.4)

Awesome Lists containing this project

README

          

generic
=======

A port of Vesa Karvonen's generic library to smlpkg, targeting MLton.

It is an implementation of type indexed values
so that you can derive pretty, hash, ord, arbitrary, pickle, uniplate, etc from one representation.

To add the library with smlpkg, run:

```
smlpkg add github.com/DarinM223/generic
```

Then include:

```
lib/github.com/DarinM223/generic/lib-all.mlb
```

into your mlb file to derive everything. If you only want to derive certain things, include:

```
lib/github.com/DarinM223/generic/lib.mlb
```

and

```
lib/github.com/DarinM223/generic/with/generic.sml
lib/github.com/DarinM223/generic/with/eq.sml
...
```

for the things you want to derive.

For building with Poly/ML, you would want a build script generated by `smlgen -proj ` that generates a `build.sml` PolyML file from a `.mlb` file. That script should automatically autowire all the MLton specific files into Poly/ML specific ones.