diff options
author | Profpatsch <mail@profpatsch.de> | 2020-06-27T19·45+0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2020-06-27T20·48+0000 |
commit | e2c7e38934772744883494a01a784acc15ad2ff7 (patch) | |
tree | 485edce694946aed718e92962bfcad46324918d6 | |
parent | f3bf9fbad91387b59185ec26dac266c89b6dd3d2 (diff) |
feat(nix/yants): add unit type r/1103
Has one less value than bool. Change-Id: I2f2db07b1eb1f49172942bc1d8c6ceb30d987d84 Reviewed-on: https://cl.tvl.fyi/c/depot/+/661 Reviewed-by: tazjin <mail@tazj.in>
-rw-r--r-- | nix/yants/default.nix | 1 | ||||
-rw-r--r-- | nix/yants/tests/default.nix | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/nix/yants/default.nix b/nix/yants/default.nix index aacc156b433b..6da99fa3c8c4 100644 --- a/nix/yants/default.nix +++ b/nix/yants/default.nix @@ -93,6 +93,7 @@ with builtins; let in lib.fix (self: { # Primitive types any = typedef "any" (_: true); + unit = typedef "unit" (v: v == {}); int = typedef "int" isInt; bool = typedef "bool" isBool; float = typedef "float" isFloat; diff --git a/nix/yants/tests/default.nix b/nix/yants/tests/default.nix index b006f8b832d0..da539ca3562b 100644 --- a/nix/yants/tests/default.nix +++ b/nix/yants/tests/default.nix @@ -9,6 +9,7 @@ with depot.nix.yants; deepSeq rec { # Test that all primitive types match primitives = [ + (unit {}) (int 15) (bool false) (float 13.37) |