[Haskell-cafe] Generating Haskell with associated types (and kind
ndmitchell at gmail.com
Fri May 8 11:49:07 EDT 2009
> 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:
>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
it works fantastically.
On Fri, May 8, 2009 at 4:24 PM, Daniel Peebles <pumpkingod at gmail.com> 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?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe