diff options
author | David Waern <davve@dtek.chalmers.se> | 2007-09-29 14:15:37 +0000 |
---|---|---|
committer | David Waern <davve@dtek.chalmers.se> | 2007-09-29 14:15:37 +0000 |
commit | 3f683df722c3c2b7aba70d15daf95593fd6be96d (patch) | |
tree | 01d370d2e8323cf4089fba653923a9f1abb7db3b /src/Haddock/GHC | |
parent | e390c635fc817df5da56c67a72988fe77f2b0318 (diff) |
Use isLexConSym/isLexVarSym from OccName
Diffstat (limited to 'src/Haddock/GHC')
-rw-r--r-- | src/Haddock/GHC/Utils.hs | 9 |
1 files changed, 3 insertions, 6 deletions
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 |