Concrete data type

From HaskellWiki
Revision as of 02:18, 3 October 2006 by BrettGiles (talk | contribs) (HaWiki conversion)

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

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, Bool, [(String,String)] and Tree String are concrete data types.