Uniquable RdrName instance
carter.schonwald at gmail.com
Mon Jun 16 22:30:31 UTC 2014
would making arrow remindable involve dropping the arr == haksell functions
assumption or doing something that would allow generalized arrows?
On Mon, Jun 16, 2014 at 5:14 PM, Nicolas Frisby <nicolas.frisby at gmail.com>
> FYI it's #7828, not #7282.
> Jan, I'm very glad you're working on this. Thanks!
> On Mon, Jun 16, 2014 at 2:33 PM, Jan Stolarek <jan.stolarek at p.lodz.pl>
>> > Why do you want this? The danger I see lurking is that you might find
>> > RdrNames that give the same answer to getUnique but represent different
>> Yes, that's exactly my concern.
>> > Why do you want this?
>> I'm working on #7282 - RebindableSyntax and Arrows. Here's a snippet from
>> desugaring of arrow
>> leaves = concatMap leavesMatch matches
>> leavesMatch :: LMatch Id (Located (body Id)) -> [(Located (body Id),
>> leavesMatch (L _ (Match pats _ (GRHSs grhss binds)))
>> = let defined_vars = mkVarSet (collectPatsBinders pats)
>> mkVarSet (collectLocalBinders
>> in [(body, mkVarSet (collectLStmtsBinders stmts)
>> `unionVarSet` defined_vars) | L _
>> (GRHS stmts body) <- grhss]
>> This is in the desugarer. But I need to also know `length leaves` at the
>> renaming stage, which
>> means I need to call `concatMap leavesMatch matches`. The problem is that
>> in the renamer my
>> datatypes are not parametrised by `Id`. I turned `Id` into a type
>> parameter `id`, but then I
>> can't use VarSets. I could use more general UniqueSets but only if `id`
>> type parameter is an
>> instance of Uniquable. And since in the renamer the datatypes are
>> parametrized with RdrName this
>> leads me to wanting Uniqable RdrName instance.
>> ghc-devs mailing list
>> ghc-devs at haskell.org
> ghc-devs mailing list
> ghc-devs at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs