Removing the -DUSE_REPORT_PRELUDE for Hugs, so Hugs can use quicksort for
its sorting function.
Related wibbles in the libraries.
# -------------------------------------------------------------------------- #
# -------------------------------------------------------------------------- #
-# $Id: Makefile,v 1.11 2000/04/06 00:01:27 andy Exp $
+# $Id: Makefile,v 1.12 2000/04/10 02:28:08 andy Exp $
# -------------------------------------------------------------------------- #
TOP = ../..
# -------------------------------------------------------------------------- #
TOP = ../..
-HUGSCPP = ../../utils/hscpp/hscpp -D__HUGS__ -DUSE_REPORT_PRELUDE -D__HASKELL98__
+HUGSCPP = ../../utils/hscpp/hscpp -D__HUGS__ -D__HASKELL98__
%.lhs :: $(GHC_LIB_DIR)/std/%.lhs
$(HUGSCPP) -I../../includes $< > $*.lhs
%.lhs :: $(GHC_LIB_DIR)/std/%.lhs
$(HUGSCPP) -I../../includes $< > $*.lhs
#ifdef USE_REPORT_PRELUDE
findIndices p xs = [ i | (x,i) <- zip xs [0..], p x]
#else
#ifdef USE_REPORT_PRELUDE
findIndices p xs = [ i | (x,i) <- zip xs [0..], p x]
#else
+#ifdef __HUGS__
+findIndices p xs = [ i | (x,i) <- zip xs [0..], p x]
+#else
-- Efficient definition
findIndices p ls = loop 0# ls
where
loop _ [] = []
loop n (x:xs) | p x = I# n : loop (n +# 1#) xs
| otherwise = loop (n +# 1#) xs
-- Efficient definition
findIndices p ls = loop 0# ls
where
loop _ [] = []
loop n (x:xs) | p x = I# n : loop (n +# 1#) xs
| otherwise = loop (n +# 1#) xs
+#endif /* __HUGS__ */
+#endif /* USE_REPORT_PRELUDE */
isPrefixOf :: (Eq a) => [a] -> [a] -> Bool
isPrefixOf [] _ = True
isPrefixOf :: (Eq a) => [a] -> [a] -> Bool
isPrefixOf [] _ = True