docs: Add defun to README
This commit is contained in:
parent
5949663fcd
commit
ef4ded7b98
2 changed files with 19 additions and 3 deletions
22
yants.md
22
yants.md
|
@ -1,9 +1,21 @@
|
||||||
yants
|
yants
|
||||||
=====
|
=====
|
||||||
|
|
||||||
This is a tiny type-checker for data in Nix, written in Nix. It doesn't have all
|
This is a tiny type-checker for data in Nix, written in Nix.
|
||||||
the features I think it should have (yet), but it works and its types are
|
|
||||||
composable.
|
Features:
|
||||||
|
|
||||||
|
* Checking of primitive types (`int`, `string` etc.)
|
||||||
|
* Checking polymorphic types (`option`, `list`, `either`)
|
||||||
|
* Defining & checking struct/record types
|
||||||
|
* Defining & matching enum types
|
||||||
|
* Defining function signatures (including curried functions)
|
||||||
|
* Types are composable! `option string`! `list (either int (option float))`!
|
||||||
|
|
||||||
|
Lacking:
|
||||||
|
|
||||||
|
* Any kind of inference (Nix's reflection ability is not strong enough)
|
||||||
|
* Convenient syntax for attribute-set function signatures
|
||||||
|
|
||||||
## Primitives & simple polymorphism
|
## Primitives & simple polymorphism
|
||||||
|
|
||||||
|
@ -20,3 +32,7 @@ composable.
|
||||||
## Enums!
|
## Enums!
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Functions!
|
||||||
|
|
||||||
|

|
||||||
|
|
Loading…
Add table
Reference in a new issue