From bc03222bde69ca16dfd761d9d3031ebca14fee4f Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 5 Oct 2017 21:06:48 +0200 Subject: [PATCH] types: remove loeOf --- lib/types.nix | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lib/types.nix b/lib/types.nix index 62c6a978af9..c48e3b3000c 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -240,25 +240,6 @@ rec { functor = (defaultFunctor name) // { wrapped = elemType; }; }; - # List or element of ... - loeOf = elemType: mkOptionType rec { - name = "loeOf"; - description = "element or list of ${elemType.description}s"; - check = x: isList x || elemType.check x; - merge = loc: defs: - let - defs' = filterOverrides defs; - res = (head defs').value; - in - if isList res then concatLists (getValues defs') - else if lessThan 1 (length defs') then - throw "The option `${showOption loc}' is defined multiple times, in ${showFiles (getFiles defs)}." - else if !isString res then - throw "The option `${showOption loc}' does not have a string value, in ${showFiles (getFiles defs)}." - else res; - functor = (defaultFunctor name) // { wrapped = elemType; }; - }; - # Value of given type but with no merging (i.e. `uniq list`s are not concatenated). uniq = elemType: mkOptionType rec { name = "uniq";