Changes between Version 6 and Version 7 of Commentary/Compiler/TypeType
- Timestamp:
- 09/14/06 13:31:27 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Compiler/TypeType
v6 v7 19 19 * [[GhcFile(compiler/types/Type.lhs)]]: core-view utility functions over {{{Type}}}. 20 20 * [[GhcFile(compiler/typecheck/TcType.lhs)]]: source-view utility functions over {{{Type}}}. 21 The "view" functions are ''shallow'', not deep---a view function just looks at the root of the tree representing the type. This leads to a nice programming idiom in which a case can be guarded by {{Just t' <- coreView t}}, which unfortunately the margin of this Wiki is too small to contain. 21 22 22 23 The module {{{TypeRep}}} exposes the representation becauese a few other modules ({{{Type}}}, {{{TcType}}}, {{{Unify}}}, etc) work directly on its representation. However, you should not lightly pattern-match on {{{Type}}}; it is meant to be an abstract type. Instead, try to use functions defined by {{{Type}}}, {{{TcType}}} etc.
