Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
113397e4
Commit
113397e4
authored
Oct 08, 2004
by
simonpj
Browse files
[project @ 2004-10-08 11:36:26 by simonpj]
Fix missing case for algTyConRhs; fixes test ghci011
parent
2b65c00d
Changes
3
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/iface/IfaceSyn.lhs
View file @
113397e4
...
...
@@ -53,7 +53,7 @@ import TyCon ( TyCon, ArgVrcs, AlgTyConRhs(..), isRecursiveTyCon, isForeignTyCo
isSynTyCon, isAlgTyCon, isPrimTyCon, isFunTyCon,
isTupleTyCon, tupleTyConBoxity,
tyConHasGenerics, tyConArgVrcs, getSynTyConDefn,
tyConArity, tyConTyVars, algT
c
Rhs, tyConExtName )
tyConArity, tyConTyVars, algT
yCon
Rhs, tyConExtName )
import DataCon ( dataConName, dataConSig, dataConFieldLabels, dataConStrictMarks,
dataConTyCon, dataConIsInfix, isVanillaDataCon )
import Class ( FunDep, DefMeth, classExtraBigSig, classTyCon )
...
...
@@ -490,7 +490,7 @@ tyThingToIfaceDecl _ abstract_tcs ext (ATyCon tycon)
| isAlgTyCon tycon
= IfaceData { ifName = getOccName tycon,
ifTyVars = toIfaceTvBndrs tyvars,
ifCons = ifaceConDecls (algT
c
Rhs tycon),
ifCons = ifaceConDecls (algT
yCon
Rhs tycon),
ifRec = boolToRecFlag (isRecursiveTyCon tycon),
ifVrcs = tyConArgVrcs tycon,
ifGeneric = tyConHasGenerics tycon }
...
...
ghc/compiler/typecheck/TcSplice.lhs
View file @
113397e4
...
...
@@ -45,7 +45,7 @@ import TcRnMonad
import IfaceEnv ( lookupOrig )
import Class ( Class, classBigSig )
import TyCon ( TyCon, AlgTyConRhs(..), tyConTyVars, getSynTyConDefn,
isSynTyCon, isNewTyCon, tyConDataCons, algT
c
Rhs )
isSynTyCon, isNewTyCon, tyConDataCons, algT
yCon
Rhs )
import DataCon ( DataCon, dataConTyCon, dataConOrigArgTys, dataConStrictMarks,
dataConName, dataConFieldLabels, dataConWrapId, dataConIsInfix,
isVanillaDataCon )
...
...
@@ -569,7 +569,7 @@ reifyTyCon tc
; return (TH.TySynD (reifyName tc) (reifyTyVars tvs) rhs') }
reifyTyCon tc
= case algT
c
Rhs tc of
= case algT
yCon
Rhs tc of
NewTyCon data_con _ _
-> do { con <- reifyDataCon data_con
; return (TH.NewtypeD [] (reifyName tc) (reifyTyVars (tyConTyVars tc))
...
...
ghc/compiler/types/TyCon.lhs
View file @
113397e4
...
...
@@ -33,7 +33,7 @@ module TyCon(
tyConUnique,
tyConTyVars,
tyConArgVrcs,
algT
c
Rhs, tyConDataCons, tyConDataCons_maybe, tyConFamilySize,
algT
yCon
Rhs, tyConDataCons, tyConDataCons_maybe, tyConFamilySize,
tyConFields, tyConSelIds,
tyConStupidTheta,
tyConArity,
...
...
@@ -490,6 +490,11 @@ tyConFields other_tycon = []
tyConSelIds :: TyCon -> [Id]
tyConSelIds tc = [id | (_,_,id) <- tyConFields tc]
algTyConRhs :: TyCon -> AlgTyConRhs
algTyConRhs (AlgTyCon {algTcRhs = rhs}) = rhs
algTyConRhs (TupleTyCon {dataCon = con}) = DataTyCon (Just []) [con] False
algTyConRhs other = pprPanic "algTyConRhs" (ppr other)
\end{code}
\begin{code}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment