aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Utils.hs
diff options
context:
space:
mode:
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