From 3f683df722c3c2b7aba70d15daf95593fd6be96d Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 29 Sep 2007 14:15:37 +0000 Subject: Use isLexConSym/isLexVarSym from OccName --- src/Haddock/GHC/Utils.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/Haddock/GHC/Utils.hs') diff --git a/src/Haddock/GHC/Utils.hs b/src/Haddock/GHC/Utils.hs index 26860116..5e8142e5 100644 --- a/src/Haddock/GHC/Utils.hs +++ b/src/Haddock/GHC/Utils.hs @@ -52,13 +52,10 @@ modulePkgStr = packageIdString . modulePackageId -- misc -isNameSymOcc = isSymOcc . nameOccName - --- there should be a better way to check this using the GHC API -isConSym n = head (nameOccString n) == ':' -isVarSym n = fstChar /= '_' && not (isConSym n) && (not . isLetter) fstChar - where fstChar = head (nameOccString n) +isNameSym = isSymOcc . nameOccName +isNameVarSym = isLexVarSym . occNameFS . nameOccName +isNameConSym = isLexConSym . occNameFS . nameOccName getMainDeclBinder :: HsDecl name -> Maybe name -- cgit v1.2.3