about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README.md40
-rw-r--r--default.nix (renamed from yants.nix)0
-rw-r--r--screenshots/enums.png (renamed from z-enums.png)bin41305 -> 41305 bytes
-rw-r--r--screenshots/functions.png (renamed from z-functions.png)bin32907 -> 32907 bytes
-rw-r--r--screenshots/nested-structs.png (renamed from z-nested-structs.png)bin70264 -> 70264 bytes
-rw-r--r--screenshots/simple.png (renamed from z-simple.png)bin43010 -> 43010 bytes
-rw-r--r--screenshots/structs.png (renamed from z-structs.png)bin69499 -> 69499 bytes
-rw-r--r--tests.nix (renamed from z-yants-tests.nix)2
-rw-r--r--yants.md38
9 files changed, 41 insertions, 39 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..55ea764d8fbc
--- /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)
diff --git a/yants.nix b/default.nix
index 17564b61b91e..17564b61b91e 100644
--- a/yants.nix
+++ b/default.nix
diff --git a/z-enums.png b/screenshots/enums.png
index 71673e7ab63c..71673e7ab63c 100644
--- a/z-enums.png
+++ b/screenshots/enums.png
Binary files differdiff --git a/z-functions.png b/screenshots/functions.png
index 30ed50f8327b..30ed50f8327b 100644
--- a/z-functions.png
+++ b/screenshots/functions.png
Binary files differdiff --git a/z-nested-structs.png b/screenshots/nested-structs.png
index 6b03ed65ceb7..6b03ed65ceb7 100644
--- a/z-nested-structs.png
+++ b/screenshots/nested-structs.png
Binary files differdiff --git a/z-simple.png b/screenshots/simple.png
index 05a302cc6b9d..05a302cc6b9d 100644
--- a/z-simple.png
+++ b/screenshots/simple.png
Binary files differdiff --git a/z-structs.png b/screenshots/structs.png
index fcbcf6415fad..fcbcf6415fad 100644
--- a/z-structs.png
+++ b/screenshots/structs.png
Binary files differdiff --git a/z-yants-tests.nix b/tests.nix
index e1e521c5abf0..344f2c1f5934 100644
--- a/z-yants-tests.nix
+++ b/tests.nix
@@ -1,5 +1,5 @@
 with builtins;
-with (import ./yants.nix {});
+with (import ./default.nix {});
 
 # Note: Derivations are not included in the tests below as they cause
 # issues with deepSeq.
diff --git a/yants.md b/yants.md
deleted file mode 100644
index e10e120f08b6..000000000000
--- a/yants.md
+++ /dev/null
@@ -1,38 +0,0 @@
-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 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
-
-![simple](https://gist.githubusercontent.com/tazjin/ad6d48bc2416335acc5da4a197eb9ddc/raw/d7b1fa0a511ae40f0831b369df4b97103441c7e5/z-simple.png)
-
-## Structs
-
-![structs](https://gist.githubusercontent.com/tazjin/ad6d48bc2416335acc5da4a197eb9ddc/raw/d7a7cff3639115538a5085561bedf11cb36d04e7/z-structs.png)
-
-## Nested structs!
-
-![nested structs](https://gist.githubusercontent.com/tazjin/ad6d48bc2416335acc5da4a197eb9ddc/raw/d7b1fa0a511ae40f0831b369df4b97103441c7e5/z-nested-structs.png)
-
-## 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)