Hi Dan, > I was wondering whether anyone had any suggestions on a good way to > generate repetitive code with associated types and kind annotations.
haskell-src-exts is the answer: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-exts >From the project description: "Haskell-Source with Extensions (HSE, haskell-src-exts) is an extension of the standard haskell-src package, and handles most common syntactic extensions to Haskell, including: ... Indexed type families (including associated types)" I've used the project extensively in HLint (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hlint) and it works fantastically. Thanks Neil On Fri, May 8, 2009 at 4:24 PM, Daniel Peebles <[email protected]> wrote: > Hi all, > > I'd like to use TH but as far as I understand, it doesn't support this > yet (I think associated types are in HEAD but not kinds), so for now > I've been using ruby with string interpolation, which feels rather > ugly. It means that I have to edit the ruby script and regenerate the > file in question each time I make a change, which doesn't fit in very > nicely with cabal (or my patience) and so on. Ideally, I'd have > something that I can write mostly like real Haskell (with "holes" to > substitute values into), that can be integrated nicely into the cabal > build system without using custom external preprocessors or anything > like that. > > Any ideas? > > Thanks, > Dan > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
