From: andy Date: Mon, 10 Apr 2000 02:28:08 +0000 (+0000) Subject: [project @ 2000-04-10 02:28:08 by andy] X-Git-Tag: Approximately_9120_patches~4765 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d033cb52223c34095c9ab201158b9008bcba9d8b;p=ghc-hetmet.git [project @ 2000-04-10 02:28:08 by andy] Removing the -DUSE_REPORT_PRELUDE for Hugs, so Hugs can use quicksort for its sorting function. Related wibbles in the libraries. --- diff --git a/ghc/interpreter/lib/Makefile b/ghc/interpreter/lib/Makefile index da8120c..e67cab7 100644 --- a/ghc/interpreter/lib/Makefile +++ b/ghc/interpreter/lib/Makefile @@ -1,5 +1,5 @@ # -------------------------------------------------------------------------- # -# $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 = ../.. @@ -67,7 +67,7 @@ LIBS = $(PRELUDE) \ all :: $(LIBS) -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 diff --git a/ghc/lib/std/List.lhs b/ghc/lib/std/List.lhs index 4f70d3f..709687a 100644 --- a/ghc/lib/std/List.lhs +++ b/ghc/lib/std/List.lhs @@ -165,13 +165,17 @@ findIndices :: (a -> Bool) -> [a] -> [Int] #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 -#endif +#endif /* __HUGS__ */ +#endif /* USE_REPORT_PRELUDE */ isPrefixOf :: (Eq a) => [a] -> [a] -> Bool isPrefixOf [] _ = True