Commit 33cff7b6 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Fix building with ghc-6.8

parent 75190409
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -cpp #-}
{-# OPTIONS_NHC98 -cpp #-}
{-# OPTIONS_JHC -fcpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Init.Heuristics
......@@ -28,7 +32,9 @@ import qualified Distribution.PackageDescription as PD
import Distribution.Client.Types ( packageDescription, AvailablePackageDb(..) )
import Control.Monad (liftM )
import Data.Char ( isUpper, isLower, isSpace )
#if MIN_VERSION_base(3,0,3)
import Data.Either ( partitionEithers )
#endif
import Data.List ( intercalate )
import Data.Maybe ( catMaybes )
import Data.Monoid ( mempty, mappend )
......@@ -171,4 +177,13 @@ test db testProjectRoot = do
putStrLn "List of known categories"
print $ knownCategories db
-}
\ No newline at end of file
-}
#if MIN_VERSION_base(3,0,3)
#else
partitionEithers :: [Either a b] -> ([a],[b])
partitionEithers = foldr (either left right) ([],[])
where
left a (l, r) = (a:l, r)
right a (l, r) = (l, a:r)
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment