about summary refs log tree commit diff
path: root/yants.md
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-08T22·41+0100
committerVincent Ambo <tazjin@google.com>2019-08-28T13·36+0100
commitef4ded7b98f503b6d39c9e2fb843fb8de94279d9 (patch)
tree1cacfd6106ba037f3d0b8243ef80997754709790 /yants.md
parent5949663fcd843fe746f602f4a2509a11d8a94f06 (diff)
docs: Add defun to README
Diffstat (limited to 'yants.md')
-rw-r--r--yants.md22
1 files changed, 19 insertions, 3 deletions
diff --git a/yants.md b/yants.md
index 6db2068255dc..e10e120f08b6 100644
--- a/yants.md
+++ b/yants.md
@@ -1,9 +1,21 @@
 yants
 =====
 
-This is a tiny type-checker for data in Nix, written in Nix. It doesn't have all
-the features I think it should have (yet), but it works and its types are
-composable.
+This is a tiny type-checker for data in Nix, written in Nix.
+
+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
 
@@ -20,3 +32,7 @@ composable.
 ## Enums!
 
 ![enums](https://gist.githubusercontent.com/tazjin/ad6d48bc2416335acc5da4a197eb9ddc/raw/b435b5996a176a9e824c42da4713a1d30f261338/z-enums.png)
+
+## Functions!
+
+![functions](https://gist.githubusercontent.com/tazjin/ad6d48bc2416335acc5da4a197eb9ddc/raw/ccece1eb9a1cb3b1add1ba1a1f65df3adca64a8f/z-functions.png)