diff options
author | David Waern <david.waern@gmail.com> | 2011-11-06 00:47:21 +0100 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2011-11-06 01:20:37 +0100 |
commit | f19cc291ca05b0a7fc8f716007224216c74e22a2 (patch) | |
tree | a1bf9648326ed5a2364de8c3edc87f6ee87810ff /src/Haddock/GhcUtils.hs | |
parent | 2f1036494c17b8bc38ec8b63d12d3944a0054e3b (diff) |
Use getDeclMainBinder instead of declNames.
Diffstat (limited to 'src/Haddock/GhcUtils.hs')
-rw-r--r-- | src/Haddock/GhcUtils.hs | 8 |
1 files changed, 1 insertions, 7 deletions
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 |