Type synonym

From HaskellWiki
Revision as of 07:41, 29 November 2007 by Lemming (talk | contribs) (link to type article)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A type synonym is a new name for an existing type. Values of different synonyms of the same type are entirely compatible. In Haskell you can define a type synonym using type:

type MyChar = Char

In C you define a type synonym using typedef.