Personal tools

Reified type

From HaskellWiki

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