summaryrefslogtreecommitdiffstats
path: root/krebs/4lib/maybe.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-20 02:36:13 +0200
committertv <tv@shackspace.de>2015-10-20 03:02:27 +0200
commitaaa52a7a1c68687b1d90c4fa363e4446f6af9f3d (patch)
tree921e82e0ed4231241f2c3b4fb4a071ca78c4c3b4 /krebs/4lib/maybe.nix
parentcb654782fa9b8130d056579a7922062a92501b77 (diff)
RIP lib.maybe
Diffstat (limited to 'krebs/4lib/maybe.nix')
-rw-r--r--krebs/4lib/maybe.nix10
1 files changed, 0 insertions, 10 deletions
diff --git a/krebs/4lib/maybe.nix b/krebs/4lib/maybe.nix
deleted file mode 100644
index 5189c99a1..000000000
--- a/krebs/4lib/maybe.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ ... }:
-
-rec {
- Just = x: { type = "maybe"; value = x; };
- Nothing = { type = "maybe"; };
- isMaybe = x: builtins.typeOf x == "set" && x.type or false == "maybe";
- isJust = x: isMaybe x && builtins.hasAttr "value" x;
- fromJust = x: assert isJust x; x.value;
- catMaybes = xs: map fromJust (builtins.filter isJust xs);
-}