On Wed, Apr 18, 2012 at 9:40 AM,
dag.od...@gmail.com <dag.od...@gmail.com> wrote:
OK, so if I run trhsx on this:
https://github.com/dag/happaste/blob/master/src/Happaste/Routes.hs
$ trhsx src/Happaste/Routes.hs
Ambiguous infix expression
The issue is the sitemap definition on line 39, but GHC is happily accepting it since it knows the precedence of the (<>) and (</>) operators from boomerang. I can work around it with extra parenthesis, of course.
I was first thinking that this issue isn't easily solvable since src-exts would have to know the precedence of imported operators, but luite's comment on IRC had me wonder if that was really the case.
Ah, I see. The problem is of course that trhsx resolves using baseFixities, with no possibility to override. My fault entirely.
So then the question is, will anything in HSX.Transform break by not knowing anything about the semantics of operators? A quick scan of the code says no - infix applications are simply treated as structural boilerplate. In other words, it should be safe to turn off fixity resolution completely. I'll do that for the next release (which will come sooner than you'd think!).
Cheers,
/Niklas