anchor.diff:          operator = m: imap (moduleImport m) (getImports m);
         });
   
  -  selectDeclsAndDefs = modules:
  -    lib.concatMap (m:
  -      if m ? config || m ? options then
  -         [ (m.options or {}) ]
  -      ++ [ (m.config or {}) ]
  -      else
  -        [ m ]
  -    ) modules;
  -
   
     moduleApply = funs: module:
       lib.mapAttrs (name: value:
  
positive.code:       map (selectModule name) modules
      );
  
    modulesNames = modules:
      lib.concatMap (m: []
      ++ optionals (m ? options) (lib.attrNames m.options)
      ++ optionals (m ? config) (lib.attrNames m.config)
      ) modules;
  
    moduleZip = funs: modules:
      lib.mapAttrs (name: fun:
        fun (catAttrs name modules)
      ) funs;
  
    moduleMerge = path: modules:
      let modules_ = modules; in
  
negative.code:   || builtins.isList x
    );
  
  
    importIfPath = path:
      if isPath path then
        import path
      else
        path;
  
  
    applyIfFunction = f: arg:
      if builtins.isFunction f then
        f arg
      else
        f;
  
  
    isModule = m:
         (m ? config && isAttrs m.config && ! isOption m.config)
      || (m ? options && isAttrs m.options && ! isOption m.options);
  
  
    # Convert module to a set which has imports / options and config
    # attributes.
  