Changes between Version 3 and Version 4 of Commentary/Compiler/TypeType


Ignore:
Timestamp:
Sep 11, 2006 3:47:53 PM (9 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/TypeType

    v3 v4  
    3030GHC's use of [wiki:Commentary/Compiler/FC coercions and equality constraints] is important enough to deserve its own page. 
    3131 
    32 == The representation of {{Type}} == 
     32== The representation of {{{Type}}} == 
    3333 
    3434Here, then is the representation of types (see [[GhcFile(compiler/types/TypeRep.lhs)]] for more details): 
     
    8989GHC uses the following nomenclature for types: 
    9090 
    91  '''Unboxed''':: a type 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. 
    9292 
    93  '''Lifted''':: a type is lifted iff it has bottom as an element. Closures always have lifted types:  i.e. any let-bound 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 let-bound 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. 
    9494 
    9595 '''Data''':: A type declared with '''{{{data}}}'''.  Also boxed tuples. 
    9696 
    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". 
    9898 
    99  '''Primitive''': a type is primitive iff it is a built-in type that can't be expressed in Haskell. 
     99 '''Primitive''':: a type is primitive iff it is a built-in type that can't be expressed        in Haskell. 
    100100   
    101101  Currently, all primitive types are unlifted, but that's not necessarily the case.  (E.g. Int could be primitive.)