From 6468845255e5516d4567f9bef48d815549b20910 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 28 Aug 2019 14:53:55 +0100 Subject: chore: Change file layout to match repository instead of gist --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000000..55ea764d8f --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +yants +===== + +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 & matching sum types +* Defining function signatures (including curried functions) +* Types are composable! `option string`! `list (either int (option float))`! +* Type errors also compose! + +Lacking: + +* Any kind of inference +* Convenient syntax for attribute-set function signatures + +## Primitives & simple polymorphism + +![simple](screenshots/simple.png) + +## Structs + +![structs](screenshots/structs.png) + +## Nested structs! + +![nested structs](screenshots/nested-structs.png) + +## Enums! + +![enums](screenshots/enums.png) + +## Functions! + +![functions](screenshots/functions.png) -- cgit 1.4.1