aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-04-16 17:51:09 +0200
committerBen Gamari <ben@smart-cactus.org>2016-04-16 17:51:09 +0200
commita77728cc274751e8b8077b3ccc8aacc7d00bf36d (patch)
treeadf359ede9d324d1db4985dbc80dbc30e479a1d8 /haddock-api
parent1204af7031c627b39d4cef7cdb5842cdc199ddde (diff)
parentb89d1c2456bdb2d4208d94ded56155f7088a37d0 (diff)
Merge pull request #489 from mpickering/unused-functions
Remove some unused functions
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs32
-rw-r--r--haddock-api/src/Haddock/Types.hs5
2 files changed, 0 insertions, 37 deletions
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index 4e5e008b..3933f8e7 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -35,13 +35,6 @@ import Class
moduleString :: Module -> String
moduleString = moduleNameString . moduleName
-lookupLoadedHomeModuleGRE :: GhcMonad m => ModuleName -> m (Maybe GlobalRdrEnv)
-lookupLoadedHomeModuleGRE mod_name = withSession $ \hsc_env ->
- case lookupUFM (hsc_HPT hsc_env) mod_name of
- Just mod_info -> return (mi_globals (hm_iface mod_info))
- _not_a_home_module -> return Nothing
-
-
isNameSym :: Name -> Bool
isNameSym = isSymOcc . nameOccName
@@ -123,26 +116,11 @@ isUserLSig (L _(TypeSig {})) = True
isUserLSig (L _(ClassOpSig {})) = True
isUserLSig _ = False
-isTyClD :: HsDecl a -> Bool
-isTyClD (TyClD _) = True
-isTyClD _ = False
-
isClassD :: HsDecl a -> Bool
isClassD (TyClD d) = isClassDecl d
isClassD _ = False
-
-isDocD :: HsDecl a -> Bool
-isDocD (DocD _) = True
-isDocD _ = False
-
-
-isInstD :: HsDecl a -> Bool
-isInstD (InstD _) = True
-isInstD _ = False
-
-
isValD :: HsDecl a -> Bool
isValD (ValD _) = True
isValD _ = False
@@ -156,11 +134,6 @@ declATs _ = []
pretty :: Outputable a => DynFlags -> a -> String
pretty = showPpr
-
-trace_ppr :: Outputable a => DynFlags -> a -> b -> b
-trace_ppr dflags x y = trace (pretty dflags x) y
-
-
-------------------------------------------------------------------------------
-- * Located
-------------------------------------------------------------------------------
@@ -173,11 +146,6 @@ unL (L _ x) = x
reL :: a -> Located a
reL = L undefined
-
-before :: Located a -> Located a -> Bool
-before = (<) `on` getLoc
-
-
-------------------------------------------------------------------------------
-- * NamedThing instances
-------------------------------------------------------------------------------
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index 3a4df70c..eacf4473 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -268,11 +268,6 @@ noDocForDecl :: DocForDecl name
noDocForDecl = (Documentation Nothing Nothing, Map.empty)
-unrenameDocForDecl :: DocForDecl DocName -> DocForDecl Name
-unrenameDocForDecl (doc, fnArgsDoc) =
- (fmap getName doc, (fmap . fmap) getName fnArgsDoc)
-
-
-----------------------------------------------------------------------------
-- * Cross-referencing
-----------------------------------------------------------------------------