Personal tools

Concrete data type

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(HaWiki conversion)
m (Link to concrete view.)

Latest revision as of 22:06, 20 December 2006

A concrete data type is an opposite of an Abstract data type. It is a specialized solution-oriented data type that represents a well-defined single solution domain concept. A concrete data type is rarely reusable beyond its original use, but can be embedded or composed with other data types to form larger data types.

For example, a data type representing "parse tree for Haskell" is likely to be a concrete data type, whereas a "tree" data type is a corresponding Abstract data type.

In Haskell, concrete data types can be introduced with

the data construct (without parameters), or by specializing a Parametrized data type to a specific situation. For example,
Maybe Integer
Tree String
are concrete data types.

Also see concrete view.