commit 7c7ba693333c06aa59d0a915e0b4f44d56d7da0e Author: Trevor Elliott Date: Mon Oct 15 21:40:45 2012 -0700 Update for tar >= 0.4 Modified cabal-dev.cabal Modified src/Distribution/Dev/AddSource.hs diff --git a/src/Distribution/Dev/AddSource.hs b/src/Distribution/Dev/AddSource.hs index e43730d..aa4d12a 100644 --- a/src/Distribution/Dev/AddSource.hs +++ b/src/Distribution/Dev/AddSource.hs @@ -164,7 +164,7 @@ readExistingIndex sandbox = forceEntries es = let step _ l@(Left _) = l step x (Right xs) = Right (x:xs) - es' = T.foldEntries step (Right []) Left es + es' = T.foldEntries step (Right []) (Left . show) es in either (const 0) length es' `seq` return es' @@ -344,7 +344,7 @@ forcedBS :: L.ByteString -> IO L.ByteString forcedBS bs = forceBS bs >> return bs -- |Extract a cabal file from a package tarball -extractCabalFile :: T.Entries -> Maybe (PackageIdentifier, L.ByteString, PackageDescription) +extractCabalFile :: T.Entries T.FormatError -> Maybe (PackageIdentifier, L.ByteString, PackageDescription) extractCabalFile = T.foldEntries step Nothing (const Nothing) where step ent Nothing = (,,) <$> entPackageId ent <*> entBytes ent <*> (parseDesc $ entBytes ent)