diff options
author | David Waern <david.waern@gmail.com> | 2010-08-29 17:46:23 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2010-08-29 17:46:23 +0000 |
commit | 06b46e0085741d0c84aedc32de15251785eeceb2 (patch) | |
tree | 2842c189f4ecbd7447b7dfb4180e06ca80730aa6 | |
parent | f279f1be8f554dcb1744be1e722e14e36a0581ff (diff) |
Use flattenExtensionFlags with ghc >= 6.13 only
-rw-r--r-- | src/Main.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs index 51e98e1e..8e3ba3e7 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -386,7 +386,13 @@ getPrologue flags = [] -> return Nothing [filename] -> do str <- readFile filename - case parseParas (tokenise (flattenExtensionFlags defaultDynFlags) str (0,0) {- TODO: real position -}) of +#if ! MIN_VERSION_ghc(6,13,0) + let f = id +#else + let f = flattenExtensionFlags +#endif + case parseParas (tokenise (f defaultDynFlags) str + (1,0) {- TODO: real position -}) of Nothing -> throwE $ "failed to parse haddock prologue from file: " ++ filename Just doc -> return (Just doc) _otherwise -> throwE "multiple -p/--prologue options" |