simonpj at microsoft.com
Thu Feb 5 09:24:51 EST 2004
I'm not sure what you want to do. Presumably not
"replace all Ints by Floats"
because that wouldn't make sense if you applied it to the type
data T = MkT Int T | Nil
So, can you say precisely what you want your generic function to do?
What type would you like it to have?
| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
| bounces at haskell.org] On Behalf Of MR K P SCHUPKE
| Sent: 04 February 2004 18:43
| To: glasgow-haskell-users at haskell.org
| Subject: Re: Generics...
| I now have a vague clue how to do what I wanted. I wanted to
| types in place... a silly example would be to convert Ints to Floats
| Floats to Ints...
| (3 :: Int, 4.0 :: Float) -> (3.0 :: Float, 4 :: Int)
| I already have a function that will convert the input to:
| So I can then manipulate the list in this form to:
| All I now need to do is reconstruct back into the data structure...
| I have however been unable to find any docs on "gunfold" which I
| think is the way to do this...
| If somebody point me to some documentation for gunfold, or
| help in any way I would be very grateful...
| Keean Schupke.
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
More information about the Glasgow-haskell-users