Skip to content

Commit

Permalink
List should be an alias of listOf, and it should no longer be used.
Browse files Browse the repository at this point in the history
Add deprecation notice to list.
Nixos has already been ported from list to listOf (8b22566).
  • Loading branch information
MarcWeber authored and Phreedom committed Aug 22, 2013
1 parent b00d824 commit fd803fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/lib/types.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ rec {
check = lib.traceValIfNot (x: builtins.unsafeDiscardStringContext (builtins.substring 0 1 (toString x)) == "/");
};

listOf = types.list;
list = elemType: mkOptionType {
# drop this in the future:
list = builtins.trace "types.list is deprecated, use types.listOf instead" types.listOf;

listOf = elemType: mkOptionType {
name = "list of ${elemType.name}s";
check = value: lib.traceValIfNot isList value && all elemType.check value;
merge = concatLists;
Expand Down

0 comments on commit fd803fc

Please sign in to comment.