[project @ 1998-06-29 14:11:58 by sof]
authorsof <unknown>
Mon, 29 Jun 1998 14:11:58 +0000 (14:11 +0000)
committersof <unknown>
Mon, 29 Jun 1998 14:11:58 +0000 (14:11 +0000)
Remove unused cpp'ery

ghc/lib/misc/Bag.lhs

index 15678cf..acf1b97 100644 (file)
@@ -4,32 +4,19 @@
 \section[Bags]{@Bag@: an unordered collection with duplicates}
 
 \begin{code}
-#ifdef COMPILING_GHC
-#include "HsVersions.h"
-#endif
-
 module Bag (
        Bag,    -- abstract type
 
        emptyBag, unitBag, unionBags, unionManyBags,
        mapBag,
-#ifndef COMPILING_GHC
        elemBag,
-#endif
+
        filterBag, partitionBag, concatBag, foldBag,
        isEmptyBag, consBag, snocBag,
        listToBag, bagToList
     ) where
 
-#ifdef COMPILING_GHC
-IMP_Ubiq(){-uitous-}
-IMPORT_1_3(List(partition))
-
-import Outputable      ( interpp'SP )
-import Pretty
-#else
 import List(partition)
-#endif
 
 data Bag a
   = EmptyBag
@@ -42,7 +29,6 @@ data Bag a
 emptyBag = EmptyBag
 unitBag  = UnitBag
 
-#ifndef COMPILING_GHC
 elemBag :: Eq a => a -> Bag a -> Bool
 
 elemBag x EmptyBag        = False
@@ -50,7 +36,6 @@ elemBag x (UnitBag y)     = x==y
 elemBag x (TwoBags b1 b2) = x `elemBag` b1 || x `elemBag` b2
 elemBag x (ListBag ys)    = any (x ==) ys
 elemBag x (ListOfBags bs) = any (x `elemBag`) bs
-#endif
 
 unionManyBags [] = EmptyBag
 unionManyBags xs = ListOfBags xs
@@ -156,16 +141,3 @@ bagToList_append (TwoBags b1 b2) xs = bagToList_append b1 (bagToList_append b2 x
 bagToList_append (ListBag xx)    xs = xx++xs
 bagToList_append (ListOfBags bs) xs = foldr bagToList_append xs bs
 \end{code}
-
-\begin{code}
-#ifdef COMPILING_GHC
-
-instance (Outputable a) => Outputable (Bag a) where
-    ppr sty EmptyBag       = ppStr "emptyBag"
-    ppr sty (UnitBag a)     = ppr sty a
-    ppr sty (TwoBags b1 b2) = ppCat [ppr sty b1, pp'SP, ppr sty b2]
-    ppr sty (ListBag as)    = interpp'SP sty as
-    ppr sty (ListOfBags bs) = ppCat [ppLbrack, interpp'SP sty bs, ppRbrack]
-
-#endif {- COMPILING_GHC -}
-\end{code}