aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/GHC
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-08-27 21:32:22 +0000
committerIan Lynagh <igloo@earth.li>2008-08-27 21:32:22 +0000
commit56f2789e70905b790fc961455bcb9fbe56cc6626 (patch)
tree3a2516baba03b1e0c641bf89a0f319c377222016 /src/Haddock/GHC
parent2d80f85846a72a46a3640ac3d8041006c384cad8 (diff)
Fix some warnings
Diffstat (limited to 'src/Haddock/GHC')
-rw-r--r--src/Haddock/GHC/Utils.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Haddock/GHC/Utils.hs b/src/Haddock/GHC/Utils.hs
index f0423303..549482ef 100644
--- a/src/Haddock/GHC/Utils.hs
+++ b/src/Haddock/GHC/Utils.hs
@@ -12,15 +12,10 @@
module Haddock.GHC.Utils where
-#if __GLASGOW_HASKELL__ >= 609
-import Distribution.Text
-#endif
-
import Data.Char
import Data.Version
import qualified Data.Map as Map
-import GHC
import HsSyn
import SrcLoc
import Outputable
@@ -42,18 +37,20 @@ moduleString = moduleNameString . moduleName
-- return the name of the package, with version info
+modulePackageString :: Module -> String
modulePackageString = packageIdString . modulePackageId
-- return the (name,version) of the package
-modulePackageInfo mod = case unpackPackageId pkg of
+modulePackageInfo :: Module -> (String, [Char])
+modulePackageInfo modu = case unpackPackageId pkg of
Nothing -> (packageIdString pkg, "")
#if __GLASGOW_HASKELL__ >= 609
Just x -> (display $ pkgName x, showVersion (pkgVersion x))
#else
Just x -> (pkgName x, showVersion (pkgVersion x))
#endif
- where pkg = modulePackageId mod
+ where pkg = modulePackageId modu
mkModuleNoPackage :: String -> Module