From: simonpj Date: Thu, 11 Nov 2004 17:48:49 +0000 (+0000) Subject: [project @ 2004-11-11 17:48:49 by simonpj] X-Git-Tag: nhc98-1-18-release~195 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=24585f9f4ac1002b92257f0087b1ec1ec18387db;p=ghc-base.git [project @ 2004-11-11 17:48:49 by simonpj] Fix version skew --- diff --git a/Data/Version.hs b/Data/Version.hs index beda6ba..a57678f 100644 --- a/Data/Version.hs +++ b/Data/Version.hs @@ -30,7 +30,12 @@ module Data.Version ( showVersion, parseVersion, ) where -#if __GLASGOW_HASKELL__ < 603 +-- These #ifdefs are necessary because this code might be compiled as +-- part of ghc/lib/compat, and hence might be compiled by an older version +-- of GHC. In which case, we might need to pick up ReadP from +-- Distribution.Compat.ReadP, because the version in +-- Text.ParserCombinators.ReadP doesn't have all the combinators we need. +#if __GLASGOW_HASKELL__ <= 602 import Distribution.Compat.ReadP #else import Text.ParserCombinators.ReadP @@ -125,7 +130,7 @@ showVersion (Version branch tags) -- | A parser for versions in the format produced by 'showVersion'. -- -#if __GLASGOW_HASKELL__ < 602 +#if __GLASGOW_HASKELL__ <= 602 parseVersion :: ReadP r Version #else parseVersion :: ReadP Version