aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Utils.hs
diff options
context:
space:
mode:
authorDavid Waern <davve@dtek.chalmers.se>2007-10-02 01:05:19 +0000
committerDavid Waern <davve@dtek.chalmers.se>2007-10-02 01:05:19 +0000
commitfe2f0cc0e8fda4b4cfe6ea64083c91dbfec2cadb (patch)
tree93a9dd60b44238b0baeceba991870bd30bc56ff6 /src/Haddock/Utils.hs
parenteda2c60c5040c6869d3de3e130e07fd6cca590a4 (diff)
Improve parsing of doc options
Diffstat (limited to 'src/Haddock/Utils.hs')
-rw-r--r--src/Haddock/Utils.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Haddock/Utils.hs b/src/Haddock/Utils.hs
index 502a4795..fd19de9f 100644
--- a/src/Haddock/Utils.hs
+++ b/src/Haddock/Utils.hs
@@ -28,6 +28,9 @@ module Haddock.Utils (
markup,
idMarkup,
+ -- * List utilities
+ replace,
+
-- * Binary extras
-- FormatVersion, mkFormatVersion
) where
@@ -249,6 +252,15 @@ html_xrefs_ref = unsafePerformIO (newIORef (error "module_map"))
html_xrefs :: Map Module FilePath
html_xrefs = unsafePerformIO (readIORef html_xrefs_ref)
+
+-----------------------------------------------------------------------------
+-- List utils
+-----------------------------------------------------------------------------
+
+
+replace a b xs = map (\x -> if x == a then b else x) xs
+
+
-----------------------------------------------------------------------------
-- put here temporarily