Personal tools

Reified type

From HaskellWiki

Revision as of 14:21, 30 September 2006 by BrettGiles (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To "reify" something is to take something that is abstract and regard it as material. A classic example is the way that the ancients took abstract concepts (e.g. "victory") and turned them into deities (e.g. Nike, the Greek goddess of victory).

A reified type is a value that represents a type. Using reified types instead of real types means that you can do any manipulations with them that you can do with values.

In Haskell, the value
undefined
is a member of every (boxed) type, so that is often a good value to use to represent a type, assuming you don't need to break it apart.

Example: Traits type class