feat(nix/yants): add unit type
Has one less value than bool. Change-Id: I2f2db07b1eb1f49172942bc1d8c6ceb30d987d84 Reviewed-on: https://cl.tvl.fyi/c/depot/+/661 Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
f3bf9fbad9
commit
e2c7e38934
2 changed files with 2 additions and 0 deletions
|
@ -93,6 +93,7 @@ with builtins; let
|
||||||
in lib.fix (self: {
|
in lib.fix (self: {
|
||||||
# Primitive types
|
# Primitive types
|
||||||
any = typedef "any" (_: true);
|
any = typedef "any" (_: true);
|
||||||
|
unit = typedef "unit" (v: v == {});
|
||||||
int = typedef "int" isInt;
|
int = typedef "int" isInt;
|
||||||
bool = typedef "bool" isBool;
|
bool = typedef "bool" isBool;
|
||||||
float = typedef "float" isFloat;
|
float = typedef "float" isFloat;
|
||||||
|
|
|
@ -9,6 +9,7 @@ with depot.nix.yants;
|
||||||
deepSeq rec {
|
deepSeq rec {
|
||||||
# Test that all primitive types match
|
# Test that all primitive types match
|
||||||
primitives = [
|
primitives = [
|
||||||
|
(unit {})
|
||||||
(int 15)
|
(int 15)
|
||||||
(bool false)
|
(bool false)
|
||||||
(float 13.37)
|
(float 13.37)
|
||||||
|
|
Loading…
Reference in a new issue