-- |Converts a 'PackageSet' to 'PortageSetConfig' that can
createPortageSetConfig :: PackageSet -> PortageSetConfig
createPortageSetConfig s = 
  let cfg = _setConfiguration s
      flat = Set.toAscList $ flattenSet s
   in PortageSetConfig 
        { _portageSetName = _setName s
        , _portageSet = toPortageSet cfg
        , _portagePackageUse = toPackageUse flat
        , _portagePackageAcceptKeywords = toPackageAcceptKeywords flat 
        , _portagePackageLicense = toPackageLicense flat
        }
createPortageSetConfig :: PackageSet -> PortageSetConfig
createPortageSetConfig s = 
  let cfg = _setConfiguration s
      flat = Set.toAscList $ flattenSet s
   in PortageSetConfig 
        { _portageSetName = _setName s
        , _portageSet = toPortageSet cfg
        , _portagePackageUse = toPackageUse flat
        , _portagePackageAcceptKeywords = toPackageAcceptKeywords flat 
        , _portagePackageLicense = toPackageLicense flat
        }
createPortageSetConfig s = 
  let cfg = _setConfiguration s
      flat = Set.toAscList $ flattenSet s
   in PortageSetConfig 
        { _portageSetName = _setName s
        , _portageSet = toPortageSet cfg
        , _portagePackageUse = toPackageUse flat
        , _portagePackageAcceptKeywords = toPackageAcceptKeywords flat 
        , _portagePackageLicense = toPackageLicense flat
        }