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.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Haddock/Utils.hs b/src/Haddock/Utils.hs
index fd19de9f..6f2c32fc 100644
--- a/src/Haddock/Utils.hs
+++ b/src/Haddock/Utils.hs
@@ -9,7 +9,7 @@ module Haddock.Utils (
-- * Misc utilities
restrictTo,
- toDescription,
+ toDescription, toInstalledDescription,
-- * Filename utilities
basename, dirname, splitFilename3,
@@ -63,10 +63,16 @@ import System.IO.Unsafe ( unsafePerformIO )
-- -----------------------------------------------------------------------------
-- Some Utilities
+
-- | extract a module's short description.
toDescription :: Interface -> Maybe (HsDoc Name)
toDescription = hmi_description . ifaceInfo
+-- | extract a module's short description.
+toInstalledDescription :: InstalledInterface -> Maybe (HsDoc Name)
+toInstalledDescription = hmi_description . instInfo
+
+
-- ---------------------------------------------------------------------------
-- Making abstract declarations