about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-08T12·14+0100
committerVincent Ambo <tazjin@google.com>2019-08-28T13·36+0100
commit2acdbb500926e3a61f85269858efbda29d64d539 (patch)
tree7f478435aad3cc4f2f40894d2dea9bab6dbcf6c1
parent76f9b1638cef4f77fea94e77c1440bf85eaf52d3 (diff)
refactor: Drop back to below 100 lines :)
-rw-r--r--yants.nix8
1 files changed, 2 insertions, 6 deletions
diff --git a/yants.nix b/yants.nix
index e7b758f4b955..8da43f6385fa 100644
--- a/yants.nix
+++ b/yants.nix
@@ -3,13 +3,10 @@
 #
 # All types (should) compose as expected.
 #
-# TODO:
-#  - enums?
+# TODO(tazjin): enums?
 
 { toPretty ? ((import <nixpkgs> {}).lib.generators.toPretty {}) }:
 
-# Checks are simply functions of the type `a -> bool` which check
-# whether `a` conforms to the specification.
 with builtins; let
   # Internal utilities:
   typeError = type: val:
@@ -32,9 +29,8 @@ with builtins; let
 
   typeSet = foldl' (s: t: s // (if t ? "name" then { "${t.name}" = t; } else t)) {};
 
-  # Struct checker implementation
+  # Struct checks performed:
   #
-  # Checks performed:
   # 1. All existing fields match their types
   # 2. No non-optional fields are missing.
   # 3. No unexpected fields are in the struct.