Re: Easily generating efficient instances for classes

2010-03-02 Thread Neil Mitchell
Hi Derive generates declarations - they can be instances, classes, data types, functions, type synonyms etc. Thanks, Neil On Mon, Mar 1, 2010 at 10:32 AM, John Lato jwl...@gmail.com wrote: From: Christian H?ner zu Siederdissen Hi, I am thinking about how to easily generate instances for a

Re: Easily generating efficient instances for classes

2010-03-02 Thread Christian Hoener zu Siederdissen
Thanks everybody for the answers. Right now, it looks like this: the indextype is abstracted out and I plan for Data.Ix and my own Data.FastIx (or however to call it). As I don't plan on creating all instances myself, Neils derive package looks good -- once I understand it completely; which I

Re: Easily generating efficient instances for classes

2010-03-01 Thread John Lato
From: Christian H?ner zu Siederdissen Hi, I am thinking about how to easily generate instances for a class. Each instance is a tuple with 1 or more elements. In addition there is a second tuple with the same number of elements but different type. This means getting longer and longer chains

Re: Easily generating efficient instances for classes

2010-02-28 Thread Neil Mitchell
As Bulat says, the Derive package might be a good way to go. I am happy to accept any new derivations, and you get lots of things for free - including writing your code using the nice haskell-src-exts library, preprocessor support, TH support etc. Thanks, Neil On Thu, Feb 25, 2010 at 8:57 AM,

Easily generating efficient instances for classes

2010-02-24 Thread Christian Höner zu Siederdissen
Hi, I am thinking about how to easily generate instances for a class. Each instance is a tuple with 1 or more elements. In addition there is a second tuple with the same number of elements but different type. This means getting longer and longer chains of something like (...,x3*x2,x2,0). -