Commit db7041f7 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-02-20 15:36:55 by simonpj]

Remove IPName altogether
parent 0aa61e36
......@@ -24,7 +24,6 @@ module Id (
-- Predicates
isImplicitId, isDeadBinder,
externallyVisibleId,
isIP,
isSpecPragmaId, isRecordSelector,
isPrimOpId, isPrimOpId_maybe, isDictFunId,
isDataConId, isDataConId_maybe,
......@@ -88,7 +87,7 @@ import IdInfo
import Demand ( Demand )
import Name ( Name, OccName,
mkSysLocalName, mkLocalName,
getOccName, isIPOcc
getOccName
)
import OccName ( UserFS )
import PrimRep ( PrimRep )
......@@ -296,8 +295,6 @@ isImplicitId id
isDeadBinder :: Id -> Bool
isDeadBinder bndr | isId bndr = isDeadOcc (idOccInfo bndr)
| otherwise = False -- TyVars count as not dead
isIP id = isIPOcc (getOccName id)
\end{code}
......
......@@ -7,7 +7,7 @@
\begin{code}
module OccName (
-- The NameSpace type; abstact
NameSpace, tcName, clsName, tcClsName, dataName, varName, ipName,
NameSpace, tcName, clsName, tcClsName, dataName, varName,
tvName, nameSpaceString,
-- The OccName type
......@@ -20,7 +20,7 @@ module OccName (
mkDerivedTyConOcc, mkClassTyConOcc, mkClassDataConOcc, mkSpecOcc,
mkGenOcc1, mkGenOcc2,
isSysOcc, isTvOcc, isDataOcc, isDataSymOcc, isSymOcc, isIPOcc, isValOcc,
isSysOcc, isTvOcc, isDataOcc, isDataSymOcc, isSymOcc, isValOcc,
occNameFS, occNameString, occNameUserString, occNameSpace, occNameFlavour,
setOccNameSpace,
......@@ -83,7 +83,6 @@ pprEncodedFS fs
\begin{code}
data NameSpace = VarName -- Variables
| IPName -- Implicit Parameters
| DataName -- Data constructors
| TvName -- Type variables
| TcClsName -- Type constructors and classes; Haskell has them
......@@ -99,13 +98,11 @@ tcClsName = TcClsName -- Not sure which!
dataName = DataName
tvName = TvName
varName = VarName
ipName = IPName
nameSpaceString :: NameSpace -> String
nameSpaceString DataName = "Data constructor"
nameSpaceString VarName = "Variable"
nameSpaceString IPName = "Implicit Param"
nameSpaceString TvName = "Type variable"
nameSpaceString TcClsName = "Type constructor or class"
\end{code}
......@@ -243,9 +240,6 @@ isDataOcc other = False
-- Pretty inefficient!
isSymOcc (OccName DataName s) = isLexConSym (decodeFS s)
isSymOcc (OccName VarName s) = isLexSym (decodeFS s)
isIPOcc (OccName IPName _) = True
isIPOcc _ = False
\end{code}
......
{-
-----------------------------------------------------------------------------
$Id: Parser.y,v 1.53 2001/02/20 09:40:43 simonpj Exp $
$Id: Parser.y,v 1.54 2001/02/20 15:36:55 simonpj Exp $
Haskell grammar.
......@@ -21,7 +21,7 @@ import RdrName
import PrelNames ( mAIN_Name, unitTyCon_RDR, funTyCon_RDR, listTyCon_RDR,
tupleTyCon_RDR, unitCon_RDR, nilCon_RDR, tupleCon_RDR
)
import OccName ( UserFS, varName, ipName, tcName, dataName, tcClsName, tvName )
import OccName ( UserFS, varName, tcName, dataName, tcClsName, tvName )
import SrcLoc ( SrcLoc )
import Module
import CallConv
......@@ -924,7 +924,7 @@ qvar :: { RdrName }
-- *after* we see the close paren.
ipvar :: { RdrName }
: IPVARID { (mkUnqual ipName (tailFS $1)) }
: IPVARID { (mkUnqual varName (tailFS $1)) }
qcon :: { RdrName }
: qconid { $1 }
......
......@@ -56,7 +56,7 @@ import HscTypes ( WhetherHasOrphans, IsBootInterface, GenAvailInfo(..),
import RdrName ( RdrName, mkRdrUnqual, mkIfaceOrig )
import Name ( OccName )
import OccName ( mkSysOccFS,
tcName, varName, ipName, dataName, clsName, tvName,
tcName, varName, dataName, clsName, tvName,
EncodedFS
)
import Module ( ModuleName, PackageName, mkSysModuleNameFS, mkModule )
......@@ -627,7 +627,7 @@ qvar_name : var_name { $1 }
| qvar_fs { mkIfaceOrig varName $1 }
ipvar_name :: { RdrName }
: IPVARID { mkRdrUnqual (mkSysOccFS ipName (tailFS $1)) }
: IPVARID { mkRdrUnqual (mkSysOccFS varName (tailFS $1)) }
qvar_names1 :: { [RdrName] }
qvar_names1 : qvar_name { [$1] }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment