Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/alexknauth/typed-racket-datatype

Algebraic Datatypes for Typed Racket
https://github.com/alexknauth/typed-racket-datatype

Last synced: about 1 month ago
JSON representation

Algebraic Datatypes for Typed Racket

Awesome Lists containing this project

README

        

typed-racket-datatype
=====================
Algebraic Datatypes for Typed Racket

[_Documentation_](https://docs.racket-lang.org/typed-racket-datatype/index.html).

```
(require typed-racket-datatype)
```

Provides `define-datatype`, a form for defining Algebraic Data Types in Typed Racket.

```
(define-datatype header (variant-id field ...) ...)

header = name-id
| (name-id param-id ...)
field = [field-id : field-type]
```

Defines `name-id` as an Algebraic Data Type with the given `variant-id`s defined as structs with their respective `field`s.

---

The repository contains 2 packages:
- `typed-racket-datatype-lib` has just the implementation
- `typed-racket-datatype` adds tests and documentation

For the Racket Package Server, they have the package sources:
- `git://github.com/AlexKnauth/typed-racket-datatype.git?path=typed-racket-datatype-lib`
- `git://github.com/AlexKnauth/typed-racket-datatype.git?path=typed-racket-datatype`