From 7d77dd8067c98cc3dede90f1346378a0a1961fd0 Mon Sep 17 00:00:00 2001 From: chak Date: Sun, 19 Jun 2005 03:08:23 +0000 Subject: [PATCH] [project @ 2005-06-19 03:08:23 by chak] Small improvement to the text --- ghc/docs/comm/the-beast/types.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ghc/docs/comm/the-beast/types.html b/ghc/docs/comm/the-beast/types.html index 0ff0a36..383b71f 100644 --- a/ghc/docs/comm/the-beast/types.html +++ b/ghc/docs/comm/the-beast/types.html @@ -90,7 +90,7 @@ data TyNote

Newtypes

- Data types declared by a newtype declarationx constitute new + Data types declared by a newtype declarations constitute new type constructors---i.e., they are not just type macros, but introduce new type names. However, provided that a newtype is not recursive, we still want to implement it by its representation type. GHC realises this @@ -134,16 +134,17 @@ data PredType distinguishes between function type constructors (variant FunTyCon) and algebraic type constructors (variant AlgTyCon), which arise from data and newtype declarations. - The variant AlgTyCon contains all the information contained + The variant AlgTyCon contains all the information available from the data/newtype declaration as well as derived information, such as the Unique and argument variance information. This includes a field algTcRhs :: AlgTyConRhs, where AlgTyConRhs distinguishes three kinds of algebraic data type declarations: (1) declarations that have been exported abstractly, (2) data declarations, and (3) newtype - declarations. The last of these both include their original right hand - side as well as the "ultimate" representation type, which is the right - hand side after expanding all type synonyms and non-recursive newtypes. + declarations. The last two both include their original right hand side; + in addition, the third variant also caches the "ultimate" representation + type, which is the right hand side after expanding all type synonyms and + non-recursive newtypes.

Both data and newtype declarations refer to their data constructors @@ -164,13 +165,14 @@ data PredType InstEnv.Instance, which in interface files are represented as IfaceSyn.IfaceInst. Moreover, the type InstEnv.InstEnv, which is a synonym for UniqFM - ClsInstEnv, provides a mapping of classes to their instances - - ClsInstEnv is essentially a list of instance declarations. + ClsInstEnv, provides a mapping of classes to their + instances---ClsInstEnv is essentially a list of instance + declarations.

-Last modified: Tue May 24 14:44:18 EST 2005 +Last modified: Sun Jun 19 13:07:22 EST 2005

-- 1.7.10.4