
13 Jun
2007
13 Jun
'07
7:20 p.m.
Hi Bulat,
2007/6/13, Bulat Ziganshin
We've had a discussion on #haskell about how we can make a function that reads in serialized values of an open data type, such as
look at Data.Generics.Text which may be implements exactly what you need
Unfortunately not. Data.Generics.Text provides gread :: Data a => ReadS a That is, you have to constrain its return type to the particular type you want to read. What I'm looking for is a way to read any type implementing a certain class (deciding the type to use based on a type tag) and returning the result in an existential wrapper. - Benja