
7 Apr
2009
7 Apr
'09
5:38 p.m.
On 2009 Apr 7, at 9:15, Daniel Fischer wrote:
Yes, they're called algebraic datatypes, but I'm not sure if a type must have more than one constructor to qualify as such.
An ADT is any type expressible by a combination of sum and product types, IIRC. Single constructor types are product types, multiple constructors are sums of product types. (Note that this leaves out "data Nil"; that's why it's an extension. "data Nil = Nil" is vacuously an ADT.) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH