
2 Sep
2012
2 Sep
'12
8:03 a.m.
On 02/09/12 20:35, timothyhobbs@seznam.cz wrote:
It seems to be a probability approaching law, that I run into this for a given multi-constructor type. Regardless of it's purpose.
Maybe your large multi-constructor types are too monolithic? Again it's hard to know given a fabricated example, but I would have been satisfied with something like: data Foo = Foo {...} data Bar = Bar {...} data Frog = Frog {...} data LargeUnion = UFoo Foo | UBar Bar | UFrog Frog case largeUnion of (UFoo foo) -> processFoo foo (UBar bar) -> processBar bar (UFrog frog) -> processFrog frog But I think from your original mail, you find this ugly in some way? Tim