anchor.diff:    mkBefore = mkOrder 500;
     mkAfter = mkOrder 1500;
   
  +  # The default priority for things that don't have a priority specified.
  +  defaultPriority = 100;
   
     # Convenient property used to transfer all definitions and their
     # properties from one option to another. This property is useful for
  
positive.code: 
    filterOverrides' = defs:
      let
        defaultPrio = 100;
        getPrio = def: if def.value._type or "" == "override" then def.value.priority else defaultPrio;
        highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
        strip = def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def;
      in {
  
negative.code:   # Similar to mkAliasAndWrapDefinitions but copies over the priority from the
    # option as well.
    #
    # If a priority is not set, it assumes a priority of defaultPriority.
    mkAliasAndWrapDefsWithPriority = wrap: option:
      let
        prio = option.highestPrio or defaultPriority;
        defsWithPrio = map (mkOverride prio) option.definitions;
      in mkAliasIfDef option (wrap (mkMerge defsWithPrio));
  
  