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] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to