diff options
author | lassulus <lass@lassul.us> | 2017-06-20 16:05:27 +0200 |
---|---|---|
committer | lassulus <lass@lassul.us> | 2017-06-20 16:05:27 +0200 |
commit | f0bcc6e1f147726cbbf8c3d8a9da503886d2321d (patch) | |
tree | bf8e0eabe03a8dcf9201c580ab1f4ecc4660b8b4 /lib/default.nix | |
parent | bda14221cf46003ecf76756a5db7422c70737c85 (diff) | |
parent | 57c6b890f9088bb333eeab215ecfeca9d09ce3ef (diff) |
Merge remote-tracking branch 'ni/master' into HEAD
Diffstat (limited to 'lib/default.nix')
-rw-r--r-- | lib/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix index 9399a0107..803a614a1 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -29,6 +29,10 @@ let setAttr = name: value: set: set // { ${name} = value; }; + test = re: x: isString x && testString re x; + + testString = re: x: match re x != null; + toC = x: let type = typeOf x; reject = throw "cannot convert ${type}"; |