summaryrefslogtreecommitdiff
path: root/ghc/compiler/codeGen
diff options
context:
space:
mode:
authorsimonpj <unknown>2005-11-16 12:55:59 +0000
committersimonpj <unknown>2005-11-16 12:55:59 +0000
commitcdea99491a8dedfc53fc2e8c4c8fbaf209802b27 (patch)
tree1b093fe6d1f9b57099a5ed257fea3e2ec2096737 /ghc/compiler/codeGen
parentb6e680de14e07e1316f3d668b2e46b7a19e7a6b6 (diff)
downloadhaskell-cdea99491a8dedfc53fc2e8c4c8fbaf209802b27.tar.gz
[project @ 2005-11-16 12:55:58 by simonpj]
Two significant changes to the representation of types 1. Change the representation of type synonyms Up to now, type synonym applications have been held in *both* expanded *and* un-expanded form. Unfortunately, this has exponential (!) behaviour when type synonyms are deeply nested. E.g. type P a b = (a,b) f :: P a (P b (P c (P d e))) This showed up in a program of Joel Reymont, now immortalised as typecheck/should_compile/syn-perf.hs So now synonyms are held as ordinary TyConApps, and expanded only on demand. SynNote has disappeared altogether, so the only remaining TyNote is a FTVNote. I'm not sure if it's even useful. 2. Eta-reduce newtypes See the Note [Newtype eta] in TyCon.lhs If we have newtype T a b = MkT (S a b) then, in Core land, we would like S = T, even though the application of T is then not saturated. This commit eta-reduces T's RHS, and keeps that inside the TyCon (in nt_etad_rhs). Result is that coreEqType can be simpler, and has less need of expanding newtypes.
Diffstat (limited to 'ghc/compiler/codeGen')
-rw-r--r--ghc/compiler/codeGen/ClosureInfo.lhs1
1 files changed, 0 insertions, 1 deletions
diff --git a/ghc/compiler/codeGen/ClosureInfo.lhs b/ghc/compiler/codeGen/ClosureInfo.lhs
index 48c4ddeda8..b0e9e232d7 100644
--- a/ghc/compiler/codeGen/ClosureInfo.lhs
+++ b/ghc/compiler/codeGen/ClosureInfo.lhs
@@ -946,7 +946,6 @@ getTyDescription ty
FunTy _ res -> '-' : '>' : fun_result res
TyConApp tycon _ -> getOccString tycon
NoteTy (FTVNote _) ty -> getTyDescription ty
- NoteTy (SynNote ty1) _ -> getTyDescription ty1
PredTy sty -> getPredTyDescription sty
ForAllTy _ ty -> getTyDescription ty
}