anchor.diff:  
     haddockPhase = ''
       runHook preHaddock
  -    ${optionalString (doHaddock && hasActiveLibrary) ''
  +    ${optionalString (doHaddock && isLibrary) ''
         ${setupCommand} haddock --html \
           ${optionalString doHoogle "--hoogle"} \
  -        ${optionalString (hasActiveLibrary && hyperlinkSource) "--hyperlink-source"}
  +        ${optionalString (isLibrary && hyperlinkSource) "--hyperlink-source"}
       ''}
       runHook postHaddock
     '';
  
positive.code:   installPhase = ''
      runHook preInstall
  
      ${if !hasActiveLibrary then "${setupCommand} install" else ''
        ${setupCommand} copy
        local packageConfDir="$out/lib/${ghc.name}/package.conf.d"
        local packageConfFile="$packageConfDir/${pname}-${version}.conf"
  
negative.code: 
      compiler = ghc;
  
      isHaskellLibrary = isLibrary;
  
      # TODO: ask why the split outputs are configurable at all?
      # TODO: include tests for split if possible
  