Search code examples
haskellabstract-data-typealgebraic-data-typesgadt

GADTs: Difference between 'Algebraic' and 'Abstract'?


It seems the terms "Generalised Abstract Data Type" and "Generalised Algebraic Data Type" are used interchangeably, but I am sure that technically they are not the same thing.

Could someone explain the difference, perhaps using a simple example in the context of Haskell?


Solution

  • There is no independent concept named generalized abstract data type. The phrase "generalized abstract data type" is sometimes incorrectly used for generalized algebraic data type. This mistake arises because both "algebraic data type" and "abstract data type" are abbreviated as "ADT".