<div dir="ltr">FYI it's #7828, not #7282.<div><br></div><div>Jan, I'm very glad you're working on this. Thanks!</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 2:33 PM, Jan Stolarek <span dir="ltr"><<a href="mailto:jan.stolarek@p.lodz.pl" target="_blank">jan.stolarek@p.lodz.pl</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">> Why do you want this? The danger I see lurking is that you might find two<br>
> RdrNames that give the same answer to getUnique but represent different<br>
</div>Yes, that's exactly my concern.<br>
<div class=""><br>
> Why do you want this?<br>
</div>I'm working on #7282 - RebindableSyntax and Arrows. Here's a snippet from desugaring of arrow<br>
notation:<br>
<br>
leaves = concatMap leavesMatch matches<br>
 where<br>
   leavesMatch :: LMatch Id (Located (body Id)) -> [(Located (body Id), IdSet)]<br>
   leavesMatch (L _ (Match pats _ (GRHSs grhss binds)))<br>
         = let defined_vars = mkVarSet (collectPatsBinders pats) `unionVarSet`<br>
                                          mkVarSet (collectLocalBinders binds)<br>
             in  [(body, mkVarSet (collectLStmtsBinders stmts) `unionVarSet` defined_vars) | L _<br>
(GRHS stmts body) <- grhss]<br>
<br>
This is in the desugarer. But I need to also know `length leaves` at the renaming stage, which<br>
means I need to call `concatMap leavesMatch matches`. The problem is that in the renamer my<br>
datatypes are not parametrised by `Id`. I turned `Id` into a type parameter `id`, but then I<br>
can't use VarSets. I could use more general UniqueSets but only if `id` type parameter is an<br>
instance of Uniquable. And since in the renamer the datatypes are parametrized with RdrName this<br>
leads me to wanting Uniqable RdrName instance.<br>
<div class="HOEnZb"><div class="h5"><br>
Janek<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
</div></div></blockquote></div><br></div>