
15 May
2015
15 May
'15
6:51 a.m.
On Fri, May 15, 2015 at 01:47:49AM -0500, Cody Goodman wrote:
How can I create Answers of type Gender, Race, or Age?
These should be possible:
λ> Answer Male λ> Answer White λ> Answer Black λ> Answer 28
Others such as using a string should not be possible:
λ> Answer "a string" -- should throw type error
It would probably help if you tell us why precisely you want this, and in particular why data Answer = AnswerGender Gender | AnswerRace Race | AnswerAge Int is not satisfactory. Tom