From f19cc291ca05b0a7fc8f716007224216c74e22a2 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sun, 6 Nov 2011 00:47:21 +0100 Subject: Use getDeclMainBinder instead of declNames. --- src/Haddock/GhcUtils.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/Haddock/GhcUtils.hs') diff --git a/src/Haddock/GhcUtils.hs b/src/Haddock/GhcUtils.hs index 33ae1b6d..d5423bee 100644 --- a/src/Haddock/GhcUtils.hs +++ b/src/Haddock/GhcUtils.hs @@ -85,21 +85,15 @@ isVarSym = isLexVarSym . occNameFS getMainDeclBinder :: HsDecl name -> [name] getMainDeclBinder (TyClD d) = [tcdName d] getMainDeclBinder (ValD d) = -#if __GLASGOW_HASKELL__ == 612 - case collectAcc d [] of - [] -> [] - (name:_) -> [unLoc name] -#else case collectHsBindBinders d of [] -> [] (name:_) -> [name] -#endif - getMainDeclBinder (SigD d) = sigNameNoLoc d getMainDeclBinder (ForD (ForeignImport name _ _ _)) = [unLoc name] getMainDeclBinder (ForD (ForeignExport _ _ _ _)) = [] getMainDeclBinder _ = [] + -- Useful when there is a signature with multiple names, e.g. -- foo, bar :: Types.. -- but only one of the names is exported and we have to change the -- cgit v1.2.3