simulating dynamic dispatch
Hal Daume III
hdaume@ISI.EDU
Thu, 20 Mar 2003 21:23:26 -0800 (PST)
> -- *Main> test $ MkFoo (0::Int)
> -- Just True
> -- *Main> test $ MkFoo (10::Int)
> -- Just False
> -- *Main> test $ MkBar 'a'
> -- Just True
> -- *Main> test $ MkBar 'b'
> -- Just False
ah, yes. i was aware that would work. i forgot to mention the constraint
that i don't want the user to have to use the MkFoo/MkBar
constructors. if i could use them internally to 'test', that would be
great, but that's what i couldn't get to work :).