[Haskell-cafe] Staged evaluation, names?

Henning Thielemann schlepptop at henning-thielemann.de
Thu Jan 8 19:12:03 EST 2009

wren ng thornton schrieb:

> Every now and then I find myself in the position where I'd like to
> define some hairy value as a CAF instead of a literal, but I'd like for
> it to be fully evaluated at compile-time rather than postponed until
> runtime. It'd be possible to bludgeon the CPP into doing this, but it
> seems easier to use an autocannon like Template Haskell to swat this fly.

Is it really necessary to use CPP or TemplateHaskell for this kind of
optimization? Can a pragma help? Maybe {-# INLINE #-} ?

More information about the Haskell-Cafe mailing list