diff --git a/ghc/utils/genprimopcode/Main.hs b/ghc/utils/genprimopcode/Main.hs index f9306fbad07f1010ae31e83eff0405991531c434..49d3921a35a1d5369919e2385164bc6af4c9112e 100644 --- a/ghc/utils/genprimopcode/Main.hs +++ b/ghc/utils/genprimopcode/Main.hs @@ -1,11 +1,16 @@ - +{-# OPTIONS -cpp #-} ------------------------------------------------------------------ -- A primop-table mangling program -- ------------------------------------------------------------------ module Main where +#if __GLASGOW_HASKELL__ >= 504 +import Text.ParserCombinators.Parsec +#else import Parsec +#endif + import Monad import Char import List diff --git a/ghc/utils/genprimopcode/Makefile b/ghc/utils/genprimopcode/Makefile index f16002496e3ea7ac7c6421154ff674829ab1825d..8c3da0f2fa7b8e508eeaf8b46dca58c5180919f0 100644 --- a/ghc/utils/genprimopcode/Makefile +++ b/ghc/utils/genprimopcode/Makefile @@ -1,11 +1,16 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.7 2001/08/08 13:21:04 qrczak Exp $ +# $Id: Makefile,v 1.8 2002/09/09 11:44:13 simonmar Exp $ TOP=../.. include $(TOP)/mk/boilerplate.mk HS_PROG = genprimopcode -SRC_HC_OPTS += -syslib text + +ghc_ge_504 = $(shell if (test $(GhcCanonVersion) -ge 504); then echo YES; else echo NO; fi) + +ifeq "$(ghc_ge_504)" "NO" +SRC_HC_OPTS += -package text +endif # genprimopcode is needed to boot in ghc/compiler... ifneq "$(BootingFromHc)" "YES"