projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
861e836
)
[project @ 2000-09-28 15:15:48 by simonpj]
author
simonpj
<unknown>
Thu, 28 Sep 2000 15:15:48 +0000
(15:15 +0000)
committer
simonpj
<unknown>
Thu, 28 Sep 2000 15:15:48 +0000
(15:15 +0000)
Wibbles
ghc/compiler/hsSyn/HsTypes.lhs
patch
|
blob
|
history
ghc/compiler/parser/ParseUtil.lhs
patch
|
blob
|
history
ghc/compiler/typecheck/TcModule.lhs
patch
|
blob
|
history
ghc/compiler/types/TyCon.lhs
patch
|
blob
|
history
ghc/compiler/types/Type.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/hsSyn/HsTypes.lhs
b/ghc/compiler/hsSyn/HsTypes.lhs
index
06ba30d
..
14157d7
100644
(file)
--- a/
ghc/compiler/hsSyn/HsTypes.lhs
+++ b/
ghc/compiler/hsSyn/HsTypes.lhs
@@
-30,7
+30,7
@@
import Type ( Type, Kind, PredType(..), UsageAnn(..), ClassContext,
getTyVar_maybe, splitSigmaTy, unUsgTy, boxedTypeKind
)
import TypeRep ( Type(..), TyNote(..) ) -- toHsType sees the representation
getTyVar_maybe, splitSigmaTy, unUsgTy, boxedTypeKind
)
import TypeRep ( Type(..), TyNote(..) ) -- toHsType sees the representation
-import TyCon ( isTupleTyCon, tupleTyConBoxity, tyConArity, tyConClass_maybe )
+import TyCon ( isTupleTyCon, tupleTyConBoxity, tyConArity )
import RdrName ( RdrName )
import Name ( toRdrName )
import OccName ( NameSpace )
import RdrName ( RdrName )
import Name ( toRdrName )
import OccName ( NameSpace )
diff --git
a/ghc/compiler/parser/ParseUtil.lhs
b/ghc/compiler/parser/ParseUtil.lhs
index
006456c
..
49c0376
100644
(file)
--- a/
ghc/compiler/parser/ParseUtil.lhs
+++ b/
ghc/compiler/parser/ParseUtil.lhs
@@
-199,9
+199,8
@@
checkPat e [] = case e of
ExplicitList es -> mapP (\e -> checkPat e []) es `thenP` \ps ->
returnP (ListPatIn ps)
ExplicitList es -> mapP (\e -> checkPat e []) es `thenP` \ps ->
returnP (ListPatIn ps)
- ExplicitTuple es Boxed -> mapP (\e -> checkPat e []) es `thenP` \ps ->
- returnP (TuplePatIn ps Boxed)
- -- Unboxed tuples are illegal in patterns
+ ExplicitTuple es b -> mapP (\e -> checkPat e []) es `thenP` \ps ->
+ returnP (TuplePatIn ps b)
RecordCon c fs -> mapP checkPatField fs `thenP` \fs ->
returnP (RecPatIn c fs)
RecordCon c fs -> mapP checkPatField fs `thenP` \fs ->
returnP (RecPatIn c fs)
diff --git
a/ghc/compiler/typecheck/TcModule.lhs
b/ghc/compiler/typecheck/TcModule.lhs
index
03f4fce
..
1478dc9
100644
(file)
--- a/
ghc/compiler/typecheck/TcModule.lhs
+++ b/
ghc/compiler/typecheck/TcModule.lhs
@@
-48,7
+48,7
@@
import Name ( nameOccName, isLocallyDefined, isGlobalName,
toRdrName, nameEnvElts,
)
import OccName ( isSysOcc )
toRdrName, nameEnvElts,
)
import OccName ( isSysOcc )
-import TyCon ( TyCon, tyConClass_maybe )
+import TyCon ( TyCon, isClassTyCon )
import Class ( Class )
import PrelNames ( mAIN_Name, mainKey )
import UniqSupply ( UniqSupply )
import Class ( Class )
import PrelNames ( mAIN_Name, mainKey )
import UniqSupply ( UniqSupply )
@@
-162,7
+162,7
@@
tcModule rn_name_supply fixities
local_classes = filter isLocallyDefined classes
local_tycons = [ tc | tc <- tycons,
isLocallyDefined tc,
local_classes = filter isLocallyDefined classes
local_tycons = [ tc | tc <- tycons,
isLocallyDefined tc,
- Nothing <- [tyConClass_maybe tc]
+ not (isClassTyCon tc)
]
-- For local_tycons, filter out the ones derived from classes
-- Otherwise the latter show up in interface files
]
-- For local_tycons, filter out the ones derived from classes
-- Otherwise the latter show up in interface files
diff --git
a/ghc/compiler/types/TyCon.lhs
b/ghc/compiler/types/TyCon.lhs
index
9692a9a
..
b878694
100644
(file)
--- a/
ghc/compiler/types/TyCon.lhs
+++ b/
ghc/compiler/types/TyCon.lhs
@@
-34,7
+34,7
@@
module TyCon(
tyConTheta,
tyConPrimRep,
tyConArity,
tyConTheta,
tyConPrimRep,
tyConArity,
- tyConClass_maybe,
+ isClassTyCon,
getSynTyConDefn,
maybeTyConSingleCon,
getSynTyConDefn,
maybeTyConSingleCon,
@@
-110,10
+110,7
@@
data TyCon
algTyConRec :: RecFlag, -- Tells whether the data type is part of
-- a mutually-recursive group or not
algTyConRec :: RecFlag, -- Tells whether the data type is part of
-- a mutually-recursive group or not
- algTyConClass_maybe :: Maybe Class -- Nothing for ordinary types;
- -- Just c for the type constructor
- -- for dictionaries of class c.
-
+ algTyConClass :: Bool -- True if this tycon comes from a class declaration
}
| PrimTyCon { -- Primitive types; cannot be defined in Haskell
}
| PrimTyCon { -- Primitive types; cannot be defined in Haskell
@@
-232,7
+229,7
@@
mkAlgTyCon name kind tyvars theta argvrcs cons ncons derivs flavour rec
dataCons = cons,
noOfDataCons = ncons,
algTyConDerivings = derivs,
dataCons = cons,
noOfDataCons = ncons,
algTyConDerivings = derivs,
- algTyConClass_maybe = Nothing,
+ algTyConClass = False,
algTyConFlavour = flavour,
algTyConRec = rec
}
algTyConFlavour = flavour,
algTyConRec = rec
}
@@
-249,7
+246,7
@@
mkClassTyCon name kind tyvars argvrcs con clas flavour
dataCons = [con],
noOfDataCons = 1,
algTyConDerivings = [],
dataCons = [con],
noOfDataCons = 1,
algTyConDerivings = [],
- algTyConClass_maybe = Just clas,
+ algTyConClass = True,
algTyConFlavour = flavour,
algTyConRec = NonRecursive
}
algTyConFlavour = flavour,
algTyConRec = NonRecursive
}
@@
-429,9
+426,9
@@
maybeTyConSingleCon tc = pprPanic "maybeTyConSingleCon: unexpected tycon " $
\end{code}
\begin{code}
\end{code}
\begin{code}
-tyConClass_maybe :: TyCon -> Maybe Class
-tyConClass_maybe (AlgTyCon {algTyConClass_maybe = maybe_cls}) = maybe_cls
-tyConClass_maybe other_tycon = Nothing
+isClassTyCon :: TyCon -> Bool
+isClassTyCon (AlgTyCon {algTyConClass = is_class_tycon}) = is_class_tycon
+isClassTyCon other_tycon = False
\end{code}
\end{code}
diff --git
a/ghc/compiler/types/Type.lhs
b/ghc/compiler/types/Type.lhs
index
1b8d996
..
aad3228
100644
(file)
--- a/
ghc/compiler/types/Type.lhs
+++ b/
ghc/compiler/types/Type.lhs
@@
-98,7
+98,7
@@
import TyCon ( TyCon,
isFunTyCon, isDataTyCon, isNewTyCon, newTyConRep,
isAlgTyCon, isSynTyCon, tyConArity,
tyConKind, tyConDataCons, getSynTyConDefn,
isFunTyCon, isDataTyCon, isNewTyCon, newTyConRep,
isAlgTyCon, isSynTyCon, tyConArity,
tyConKind, tyConDataCons, getSynTyConDefn,
- tyConPrimRep, tyConClass_maybe
+ tyConPrimRep
)
-- others
)
-- others