patter matching for custom read function
Posted
by altair211
on Stack Overflow
See other posts from Stack Overflow
or by altair211
Published on 2010-04-01T22:44:18Z
Indexed on
2010/04/01
22:53 UTC
Read the original article
Hit count: 193
haskell
Hi, I am writing a custom read function for one of the data types in my module. For eg, when I do read "(1 + 1)" :: Data
, I want it to return Plus 1 1
. My data declaration is data Data = Plus Int Int
. Thanks
© Stack Overflow or respective owner