No description
Find a file
Vincent Ambo 565a00254b fix: Bump Nix in CI setup to 2.2.2
Yants does not seem to work with older versions of Nix and I have not
yet figured out why.
2019-08-29 13:06:12 +01:00
screenshots chore: Change file layout to match repository instead of gist 2019-08-28 14:55:53 +01:00
.travis.yml fix: Bump Nix in CI setup to 2.2.2 2019-08-29 13:06:12 +01:00
CODE_OF_CONDUCT.md chore: Add contribution & code of conduct information 2019-08-28 15:06:43 +01:00
CONTRIBUTING.md chore: Add contribution & code of conduct information 2019-08-28 15:06:43 +01:00
default.nix chore: Change file layout to match repository instead of gist 2019-08-28 14:55:53 +01:00
LICENSE chore: Add Apache License 2.0 2019-08-28 15:03:17 +01:00
README.md docs: Add build status to README 2019-08-28 15:02:39 +01:00
tests.nix chore: Change file layout to match repository instead of gist 2019-08-28 14:55:53 +01:00

yants

Build Status

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

Structs

structs

Nested structs!

nested structs

Enums!

enums

Functions!

functions