Changes between Version 3 and Version 4 of Commentary/Compiler/TypeType
 Timestamp:
 Sep 11, 2006 3:47:53 PM (9 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Commentary/Compiler/TypeType
v3 v4 30 30 GHC's use of [wiki:Commentary/Compiler/FC coercions and equality constraints] is important enough to deserve its own page. 31 31 32 == The representation of {{ Type}} ==32 == The representation of {{{Type}}} == 33 33 34 34 Here, then is the representation of types (see [[GhcFile(compiler/types/TypeRep.lhs)]] for more details): … … 89 89 GHC uses the following nomenclature for types: 90 90 91 '''Unboxed''':: atype is unboxed iff its representation is other than a pointer. Unboxed types are also unlifted.91 '''Unboxed''':: A type is unboxed iff its representation is other than a pointer. Unboxed types are also unlifted. 92 92 93 '''Lifted''':: atype is lifted iff it has bottom as an element. Closures always have lifted types: i.e. any letbound identifier in Core must have a lifted type. Operationally, a lifted object is one that can be entered. Only lifted types may be unified with a type variable.93 '''Lifted''':: A type is lifted iff it has bottom as an element. Closures always have lifted types: i.e. any letbound identifier in Core must have a lifted type. Operationally, a lifted object is one that can be entered. Only lifted types may be unified with a type variable. 94 94 95 95 '''Data''':: A type declared with '''{{{data}}}'''. Also boxed tuples. 96 96 97 '''Algebraic''':: an algebraic data type is a data type with one or more constructors, whether declared with {{{data}}} or {{{newtype}}}. An algebraic type is one that can be deconstructed with a case expression. "Algebraic" is '''NOT''' the same as "lifted", because unboxed tuples count as "algebraic".97 '''Algebraic''':: An algebraic data type is a data type with one or more constructors, whether declared with {{{data}}} or {{{newtype}}}. An algebraic type is one that can be deconstructed with a case expression. "Algebraic" is '''NOT''' the same as "lifted", because unboxed tuples count as "algebraic". 98 98 99 '''Primitive''': a type is primitive iff it is a builtin type that can't be expressed in Haskell.99 '''Primitive''':: a type is primitive iff it is a builtin type that can't be expressed in Haskell. 100 100 101 101 Currently, all primitive types are unlifted, but that's not necessarily the case. (E.g. Int could be primitive.)