
9 Feb
2008
9 Feb
'08
7:28 p.m.
On Feb 9, 2008, at 19:09 , Mattes Simeon wrote:
e.g. data Pair a b = Pair a b
struct Pair { a pair_a; b pair_b; };
data Either a b = Left a | Right b
union Either { enum { Left, Right } _tag; a either_left; b either_right; }; (except that Haskell makes sure you use it properly, while C will let you access foo.either_right when foo._tag == Left). -- 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