From 6cfeee53431768f8d8326d6c645d6ccda198bde0 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 28 Jul 2003 14:32:43 +0000 Subject: [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 --- src/HaddockUtil.hs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/HaddockUtil.hs') diff --git a/src/HaddockUtil.hs b/src/HaddockUtil.hs index 61c40373..9804fb6e 100644 --- a/src/HaddockUtil.hs +++ b/src/HaddockUtil.hs @@ -26,16 +26,24 @@ module HaddockUtil ( import HsSyn -import FiniteMap import List ( intersect ) import Maybe import IO ( hPutStr, stderr ) import System -import RegexString import Binary -import IOExts import Monad +#if __GLASGOW_HASKELL__ < 503 +import RegexString +import FiniteMap +import IOExts +#else +import Text.Regex +import Data.FiniteMap +import Data.IORef +import System.IO.Unsafe ( unsafePerformIO ) +#endif + -- ----------------------------------------------------------------------------- -- Some Utilities @@ -167,7 +175,11 @@ declDoc _ = Nothing parseModuleHeader :: String -> (String, Maybe ModuleInfo) parseModuleHeader str = case matchRegexAll moduleHeaderRE str of +#if __GLASGOW_HASKELL__ < 503 Just (_, _, after, _, (_:_:_:s1:s2:s3:_)) -> +#else + Just (_, _, after, (_:_:_:s1:s2:s3:_)) -> +#endif (after, Just (ModuleInfo { portability = s3, stability = s2, -- cgit v1.2.3