mess. Also cleaned up some functions:
- foldl appeared broken (it recursively called fold).
- Renamed logicalAND/logicalOR to and/or.
- Removed listOfListsToAttrs, eqStrings: obsolete.
- Removed isInList, which does the same thing as elem.
- stringToCharacters: don't return a "" at the end of the list.
- Renamed concatList to concat, as concatList (singular) is a
misnomer: it takes two lists. Likewise, renamed mergeAttr to
mergeAttrs.
misc.nix still contains a lot of stuff that should be refactored and
moved to other files.
svn path=/nixpkgs/trunk/; revision=14013
easier. Instead of writing
config.get ["foo" "bar"]
it would be much cleaner to just write
config.foo.bar
only this doesn't handle the case where option foo.bar is not
supplied in the configuration; in that case we need to take the
default value from some set of option definitions
(system/options.nix in NixOS).
Following a suggestion from Martin, the function `combine' (need
better name) takes a set of option definitions (which follow the
attribute set structure of the options) and a set of options and
fills in missing values in the latter with default values from the
former. This only works with very recent versions of Nix (it needs
Marc Weber's listToAttrs primop).
svn path=/nixpkgs/trunk/; revision=9203