about summary refs log tree commit diff
path: root/nix/yants
diff options
context:
space:
mode:
Diffstat (limited to 'nix/yants')
-rw-r--r--nix/yants/default.nix1
-rw-r--r--nix/yants/tests/default.nix1
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)