From 56f2789e70905b790fc961455bcb9fbe56cc6626 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 27 Aug 2008 21:32:22 +0000 Subject: Fix some warnings --- src/Haddock/GHC/Utils.hs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/Haddock/GHC') 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 -- cgit v1.2.3