[Haskell-cafe] how can I get template haskell macro-expanded code
from inferStartState? (repeated post, now with subject)
thomas.hartman at db.com
Thu Aug 9 15:28:21 EDT 2007
I would say both.
The stuff under Examples in the repo should all run with 8.8. (I think
currently it doesn't.)
The stuff in the wiki should say what is 8.8, what is 8.4, and obviously
also give examples that work.
The advantage of the wiki is you can make a change that propogates to the
community without having commit priviliges for the repo.
at least, that's how I've been working. Just changing the wiki for now,
and maybe someday when I'm more confident about what I'm doing I'll ask
for a commit bit for the repo.
"Brian Brunswick" <brian.brunswick at gmail.com>
08/09/2007 01:28 PM
Thomas Hartman/ext/dbcom at DBAmericas
haskell-cafe <haskell-cafe at haskell.org>, HAppS at googlegroups.com
Re: [Haskell-cafe] how can I get template haskell macro-expanded code from
inferStartState? (repeated post, now with subject)
On 09/08/07, Thomas Hartman <thomas.hartman at db.com> wrote:
> (sorry, forgot the subject on my first post)
> In the following code which uses template haskell, how can I get back
> macro-expanded code generated from
> $(inferStartState ''MyState)
I just recently used ghc -ddump-splices to debug this very same problem.
It turns out to be due to overlapping instances - inferStartState
a (from memory) specific StartStateEx instance, but actually theres a
StartState => StartStateEx, and also a general Monoid=>StartState
thats why the error message mentions Monoid.
I guess this teaches us the reason that overlapping instances are bad:
***They don't work across modules****
Another module can add an instance which wasn't visible when a first
was compiled, and the two modules end up using different instances
I've been meaning to start trying to contribute to improving the HAppS
its been such a struggle to start learning it.
So the question to the HAppS people is, where is the canonical place
for this documentation, where should one work? Is it the wiki page
above, or the stuff inside the HAppS repository?
Brian_Brunswick____brian at ithil.org____Wit____Disclaimer____!Shortsig_rules!
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe