# Description: Fixes for ghc6
# Author: Arjan Oosting <arjan@debian.org>
Index: helium-1.6/Top/src/Top/Ordering/Tree.hs
===================================================================
--- helium-1.6.orig/Top/src/Top/Ordering/Tree.hs	2006-02-05 14:35:54.000000000 -0200
+++ helium-1.6/Top/src/Top/Ordering/Tree.hs	2010-03-15 10:27:16.000000000 -0300
@@ -36,13 +36,15 @@
 infixr 8 .>. , .>>. , .<. , .<<.
 
 (.>.), (.>>.), (.<.), (.<<.) :: [a] -> Tree a -> Tree a
-((.>.), (.>>.), (.<.), (.<<.)) = 
-   let -- prevents adding an empty list
-       f constructor direction as tree
-          | null as   = tree 
-          | otherwise = constructor direction as tree
-   in (f AddList Down, f Spread Down, f AddList Up, f Spread Up)
+(.>.)  = addIfNotEmpty AddList Down
+(.>>.) = addIfNotEmpty Spread Down
+(.<.)  = addIfNotEmpty AddList Up
+(.<<.) = addIfNotEmpty Spread Up
 
+addIfNotEmpty :: (forall a . Direction -> [a] -> Tree a -> Tree a) -> Direction -> [b] -> Tree b -> Tree b
+addIfNotEmpty constructor direction as tree
+          | null as   = tree
+          | otherwise = constructor direction as tree
 
 ------------------------------------------------------------------------
 
Index: helium-1.6/Top/src/makefile
===================================================================
--- helium-1.6.orig/Top/src/makefile	2006-02-05 14:35:55.000000000 -0200
+++ helium-1.6/Top/src/makefile	2010-03-15 10:27:16.000000000 -0300
@@ -51,7 +51,7 @@
 
 topsolver-prof:
 	# build the Top constraint solver with profiling
-	$(HC) $(HC_OPTS) --make -package text -prof -auto-all -o $(BIN_DIR)/topsolver TopSolver.hs
+	$(HC) $(HC_OPTS) --make -prof -auto-all -o $(BIN_DIR)/topsolver TopSolver.hs
 
 #-----------------------------------------------------------------------
 # Cobalt
Index: helium-1.6/helium/src/Makefile.in
===================================================================
--- helium-1.6.orig/helium/src/Makefile.in	2010-03-15 10:27:14.000000000 -0300
+++ helium-1.6/helium/src/Makefile.in	2010-03-15 10:27:16.000000000 -0300
@@ -48,7 +48,7 @@
 PACKAGENET = 
 endif
 HC_OPTS = -static -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances \
-		$(PACKAGENET) -package lang -package text -package editline -i$(IFACES) $(EXTRA_HC_OPTS)
+		$(PACKAGENET) -package containers -package mtl -package parsec -package editline -i$(IFACES) $(EXTRA_HC_OPTS)
 
 AG      = @WithAG@
 AG_OPTS = -mscfr
Index: helium-1.6/lvm/src/lib/makefile
===================================================================
--- helium-1.6.orig/lvm/src/lib/makefile	2006-02-05 14:35:50.000000000 -0200
+++ helium-1.6/lvm/src/lib/makefile	2010-03-15 10:27:16.000000000 -0300
@@ -20,7 +20,7 @@
 
 #the haskell compiler
 HC	= ghc
-HC_OPTS = -cpp -static -package lang -package text -i$(IFACES) $(EXTRA_HC_OPTS)
+HC_OPTS = -cpp -static -package parsec -i$(IFACES) $(EXTRA_HC_OPTS)
 
 #Haskell sources
 COMMON	= common/Id.hs common/IdMap.hs common/IdSet.hs \
