Re: [Haskell-cafe] Generating Code

2011-12-11 Thread John Lask
It occurs to me that c2hs (or more appropriately the gtk2hsc2hs fork) is intended to solve this problem; have you looked into it? hdirect falls into this category as well ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.o

Re: [Haskell-cafe] Generating Code

2011-12-10 Thread L Corbijn
On Sat, Dec 10, 2011 at 1:59 PM, Geoffrey Mainland wrote: > On 12/10/2011 09:38, Iustin Pop wrote: >> On Fri, Dec 09, 2011 at 10:30:18PM +0100, L Corbijn wrote: >>> The major set of problems for using template haskell is that it >>> doesn't have the correct features, or better said it tries to sol

Re: [Haskell-cafe] Generating Code

2011-12-10 Thread L Corbijn
On Sat, Dec 10, 2011 at 11:12 AM, Vo Minh Thu wrote: > 2011/12/9 Stephen Tetley : >> Geoffrey Mainland did significant work generating C with his GHC quasi >> quote extension. I'm not sure the status or availability of the code >> but there was a good Haskell Workshop paper describing it. >> >> Fo

Re: [Haskell-cafe] Generating Code

2011-12-10 Thread Geoffrey Mainland
On 12/09/2011 21:47, Stephen Tetley wrote: > Geoffrey Mainland did significant work generating C with his GHC quasi > quote extension. I'm not sure the status or availability of the code > but there was a good Haskell Workshop paper describing it. In case anybody is interested, language-c-quote on

Re: [Haskell-cafe] Generating Code

2011-12-10 Thread Geoffrey Mainland
On 12/10/2011 09:38, Iustin Pop wrote: > On Fri, Dec 09, 2011 at 10:30:18PM +0100, L Corbijn wrote: >> The major set of problems for using template haskell is that it >> doesn't have the correct features, or better said it tries to solve >> another problem. Template haskell generates code into an e

Re: [Haskell-cafe] Generating Code

2011-12-10 Thread Vo Minh Thu
2011/12/9 Stephen Tetley : > Geoffrey Mainland did significant work generating C with his GHC quasi > quote extension. I'm not sure the status or availability of the code > but there was a good Haskell Workshop paper describing it. > > For the specific problem of OpenGL - as the package already exi

Re: [Haskell-cafe] Generating Code

2011-12-10 Thread Iustin Pop
On Fri, Dec 09, 2011 at 10:30:18PM +0100, L Corbijn wrote: > The major set of problems for using template haskell is that it > doesn't have the correct features, or better said it tries to solve > another problem. Template haskell generates code into an existing > module, while for this problem the

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Antoine Latter
On Fri, Dec 9, 2011 at 6:32 PM, Brandon Allbery wrote: > On Fri, Dec 9, 2011 at 17:27, Antoine Latter wrote: >> >> On Fri, Dec 9, 2011 at 2:17 PM, Erik Hesselink >> wrote: >> > Since you ask how other packages solve this problem, and since most >> > packages use template haskell, I have to ask:

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Brandon Allbery
On Fri, Dec 9, 2011 at 17:27, Antoine Latter wrote: > On Fri, Dec 9, 2011 at 2:17 PM, Erik Hesselink > wrote: > > Since you ask how other packages solve this problem, and since most > > packages use template haskell, I have to ask: why can't you use > > template haskell for this? > > For my case

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Jake McArthur
On Dec 9, 2011 4:48 PM, "Stephen Tetley" wrote: > For the specific problem of OpenGL - as the package already exists I'm > not sure a generative approach would actually pay its way I strongly disagree. OpenGLRaw is in pretty bad shape right now. It's not up to date with the OpenGL spec and is ver

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Antoine Latter
On Fri, Dec 9, 2011 at 2:17 PM, Erik Hesselink wrote: > On Fri, Dec 9, 2011 at 20:45, L Corbijn wrote: >> So I'm interested if there are other libraries that are more suitable >> to the task of generating haskell code for library use, and thus >> generate 'human readable' exported code (so no TH)

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Stephen Tetley
Geoffrey Mainland did significant work generating C with his GHC quasi quote extension. I'm not sure the status or availability of the code but there was a good Haskell Workshop paper describing it. For the specific problem of OpenGL - as the package already exists I'm not sure a generative approa

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread L Corbijn
On Fri, Dec 9, 2011 at 9:17 PM, Erik Hesselink wrote: > On Fri, Dec 9, 2011 at 20:45, L Corbijn wrote: >> So I'm interested if there are other libraries that are more suitable >> to the task of generating haskell code for library use, and thus >> generate 'human readable' exported code (so no TH)

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Erik Hesselink
On Fri, Dec 9, 2011 at 20:45, L Corbijn wrote: > So I'm interested if there are other libraries that are more suitable > to the task of generating haskell code for library use, and thus > generate 'human readable' exported code (so no TH). I'm also > interested in how other projects generate code

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Antoine Latter
On Fri, Dec 9, 2011 at 1:45 PM, L Corbijn wrote: > Hello, > > In an attempt to reduce the amount of boring repetitive work to update > the OpenGLRaw package I've created a generator to do it partially for > me. It currently uses haskell-src-exts for representing the haskell > source of the modules

[Haskell-cafe] Generating Code

2011-12-09 Thread L Corbijn
Hello, In an attempt to reduce the amount of boring repetitive work to update the OpenGLRaw package I've created a generator to do it partially for me. It currently uses haskell-src-exts for representing the haskell source of the modules. Though haskell-src-exts does an excellent job for represent