X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FOccName.lhs;h=6739ba3d2e99bbbdaa08d809b8b267812147b271;hb=d033f3b42761135a4a7ae55669e3ac03f938d6c5;hp=97d6857963d5389bc109323184781a37af433e6c;hpb=6e9417cdb3a38e0b763f82183ccc88788d1b78db;p=ghc-hetmet.git diff --git a/compiler/basicTypes/OccName.lhs b/compiler/basicTypes/OccName.lhs index 97d6857..6739ba3 100644 --- a/compiler/basicTypes/OccName.lhs +++ b/compiler/basicTypes/OccName.lhs @@ -66,8 +66,6 @@ module OccName ( startsVarSym, startsVarId, startsConSym, startsConId ) where -#include "HsVersions.h" - import Util import Unique import BasicTypes @@ -149,10 +147,10 @@ isVarName VarName = True isVarName _ = False pprNameSpace :: NameSpace -> SDoc -pprNameSpace DataName = ptext SLIT("data constructor") -pprNameSpace VarName = ptext SLIT("variable") -pprNameSpace TvName = ptext SLIT("type variable") -pprNameSpace TcClsName = ptext SLIT("type constructor or class") +pprNameSpace DataName = ptext (sLit "data constructor") +pprNameSpace VarName = ptext (sLit "variable") +pprNameSpace TvName = ptext (sLit "type variable") +pprNameSpace TcClsName = ptext (sLit "type constructor or class") pprNonVarNameSpace :: NameSpace -> SDoc pprNonVarNameSpace VarName = empty @@ -161,8 +159,8 @@ pprNonVarNameSpace ns = pprNameSpace ns pprNameSpaceBrief :: NameSpace -> SDoc pprNameSpaceBrief DataName = char 'd' pprNameSpaceBrief VarName = char 'v' -pprNameSpaceBrief TvName = ptext SLIT("tv") -pprNameSpaceBrief TcClsName = ptext SLIT("tc") +pprNameSpaceBrief TvName = ptext (sLit "tv") +pprNameSpaceBrief TcClsName = ptext (sLit "tc") \end{code} @@ -302,7 +300,7 @@ filterOccEnv x (A y) = A $ filterUFM x y instance Outputable a => Outputable (OccEnv a) where ppr (A x) = ppr x -type OccSet = UniqFM OccName +type OccSet = UniqSet OccName emptyOccSet :: OccSet unitOccSet :: OccName -> OccSet @@ -662,18 +660,18 @@ isLexSym cs = isLexConSym cs || isLexVarSym cs ------------- isLexConId cs -- Prefix type or data constructors - | nullFS cs = False -- e.g. "Foo", "[]", "(,)" - | cs == FSLIT("[]") = True - | otherwise = startsConId (headFS cs) + | nullFS cs = False -- e.g. "Foo", "[]", "(,)" + | cs == (fsLit "[]") = True + | otherwise = startsConId (headFS cs) isLexVarId cs -- Ordinary prefix identifiers | nullFS cs = False -- e.g. "x", "_x" | otherwise = startsVarId (headFS cs) isLexConSym cs -- Infix type or data constructors - | nullFS cs = False -- e.g. ":-:", ":", "->" - | cs == FSLIT("->") = True - | otherwise = startsConSym (headFS cs) + | nullFS cs = False -- e.g. ":-:", ":", "->" + | cs == (fsLit "->") = True + | otherwise = startsConSym (headFS cs) isLexVarSym cs -- Infix identifiers | nullFS cs = False -- e.g. "+"