[GHC] #12382: Rename clasing type variables more consistently

#12382: Rename clasing type variables more consistently -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: feature | Status: new request | Priority: low | Milestone: Component: Compiler | Version: 8.1 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This is minor polishing, but polish is nice: Consider {{{ :t (id,id,id) (id,id,id) :: (a -> a, a1 -> a1, a2 -> a2) }}} this looks as if the first `a` is in some way better or more important. What I’d like to see is {{{ :t (id,id,id) (id,id,id) :: (a1 -> a2, a2 -> a2, a3 -> a3) }}} In other words: If two type variables clash and need to be renamed, then rename both (all) of them. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12382 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12382: Rename clasing type variables more consistently -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): I am having a hard time finding the place where the renaming happens. If that code looks at the type (or at least all type variables bound together) as a whole this might be quite easy. If it just adds one variable by another, without being able to rename the existing ones, it might be hard. Can someone point me to the rough area of the code? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12382#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12382: Rename clasing type variables more consistently -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): Ah, it seems to be `tidyOccName` in `basicTypes/OccName`. I’ll see what can be done here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12382#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12382: Rename clasing type variables more consistently -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): Beware of recent performance fixes around `tidyOccName` (changeset:c89bd681d34d3339771ebdde8aa468b1d9ab042b/ghc), which unfortunately does not come with a performance test case. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12382#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12382: Rename clasing type variables more consistently -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): Fun fact: HEAD hands out numbers in an unexpected order: {{{ Prelude> :t (id,id,id) (id,id,id) :: (a2 -> a2, a1 -> a1, a -> a) }}} This was the other (better?) way around in 7.10. Did not check 8.0. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12382#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12382: Rename clashing type variables more consistently -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12382#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12382: Rename clashing type variables more consistently -------------------------------------+------------------------------------- Reporter: nomeata | Owner: nomeata Type: feature request | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * owner: => nomeata Comment: Some preparational work in `wip/T12382`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12382#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12382: Rename clashing type variables more consistently -------------------------------------+------------------------------------- Reporter: nomeata | Owner: nomeata Type: feature request | Status: patch Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2402 Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * status: new => patch * differential: => Phab:D2402 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12382#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12382: Rename clashing type variables more consistently
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: nomeata
Type: feature request | Status: patch
Priority: low | Milestone:
Component: Compiler (Type | Version: 8.1
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2402
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#12382: Rename clashing type variables more consistently
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: nomeata
Type: feature request | Status: closed
Priority: low | Milestone: 8.2.1
Component: Compiler (Type | Version: 8.1
checker) |
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2402
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* status: patch => closed
* resolution: => fixed
* milestone: => 8.2.1
Comment:
commit cd0750ec96fba9b1683b25954092439c0f267fd7
{{{
Author: Joachim Breitner
participants (1)
-
GHC