Data.Tuple.swap not available with ghc 6.12.3

This commit is contained in:
Joey Hess 2011-05-28 11:56:48 -04:00
parent 7db690bdc2
commit c38f826435
2 changed files with 4 additions and 1 deletions

View file

@ -11,7 +11,6 @@ import Control.Monad.State
import Data.Maybe
import System.IO
import Data.List
import Data.Tuple
import qualified Data.Map as M
import qualified Annex
@ -134,6 +133,7 @@ backend_usage = stat "backend usage" $
splits :: [Key] -> [(String, Integer)]
splits ks = M.toList $ M.fromListWith (+) $ map tcount ks
tcount k = (keyBackendName k, 1)
swap (a, b) = (b, a)
pp c [] = c
pp c ((n, b):xs) = "\n\t" ++ b ++ ": " ++ show n ++ pp c xs