Re: [Haskell-cafe] Re: Trouble with record syntax and classes

2007-02-27 Thread Albert Y. C. Lai
Thomas Nelson wrote: data ISine = Sine Integer Integer Integer String | MetaSine Integer Integer Integer [ISine] Having advised you to use different field names for different record types last time, I now confuse you by saying you can share field names in the different cases

[Haskell-cafe] Re: Trouble with record syntax and classes

2007-02-26 Thread Thomas Nelson
Thank you all for your advice so far. I went back and tried to simplify my code, but I'm still stuck. The basic idea I want is something like an arbitrary tree structure, where MetaSines are the branches containing Sines, and Sines are the leaves containing strings. I want to recurse

Re: [Haskell-cafe] Re: Trouble with record syntax and classes

2007-02-26 Thread Steve Schafer
On Mon, 26 Feb 2007 23:41:14 -0600 (CST), you wrote: Here's my second attempt at the code: ... You've left out a bunch of constructors, and there are various other errors here and there. I think this will do what you want: data ISine = Sine Integer Integer Integer [Char] | MetaSine