Questions tagged [algebraic-data-types]

Two common classes of algebraic types are product types (i.e., tuples and records) and sum types (i.e., tagged or disjoint unions, coproduct types or variant types). (from Wikipedia)

Filter by
Sorted by
Tagged with
1 vote
1 answer
20 views

Type class constaint is ignored in type synonym definition

My class constraint is ignored in a type synonym definition: for type_synonym 'value myTypeOperator = "'value::group_add" I get ...
Gergely's user avatar
  • 267
29 votes
1 answer
1k views

What is an algebraic data type?

When I first learned Haskell, I was told that you use data keyword to define an "algebraic data type", or a "sum type". Then I learned the idea ...
ice1000's user avatar
  • 5,857