| 4 | |

| 5 | == Terminology == |

| 6 | |

| 7 | * A ''lifted'' type is one that contains bottom (_|_), conversely an ''unlifted'' type does not contain _|_. |

| 8 | For example, {{{Array}}} is lifted, but {{{ByteArray#}}} is unlifted. |

| 9 | |

| 10 | * A ''boxed'' type is represented by a pointer to an object in the heap, an ''unboxed'' object is represented by a value. |

| 11 | For example, {{{Int}}} is boxed, but {{{Int#}}} is unboxed. |

| 12 | |

| 13 | The representation of _|_ must be a pointer: it is an object that when evaluated throws an exception or enters an infinite loop. Therefore, only boxed types may be lifted. |

| 14 | |

| 15 | There are boxed unlifted types: eg. {{{ByteArray#}}}. If you have a value of type {{{ByteArray#}}}, it definitely points to a heap object with type {{{ARR_WORDS}}} (see below), rather than an unevaluated thunk. |

| 16 | |

| 17 | Unboxed tuples {{{(#...#)}}} are both unlifted and unboxed. They are represented by multiple values passed in registers or on the stack, according to the [wiki:Commentary/Rts/HaskellExecution return convention]. |

| 18 | |

| 19 | == Heap Objects == |

| 20 | |

| 21 | All heap objects have the same basic layout, embodied by the type {{{StgClosure}}} in [http://darcs.haskell.org/ghc/includes/Closures.h Closures.h]. The diagram below shows the layout of a heap object: |

| 22 | |

| 23 | |

| 24 | == Info Tables == |

| 25 | |

| 26 | |

| 27 | == Types of Heap Object == |