Module Renaming: GHC.Core.Op

Hello devs, While I looked at the renaming a bit when proposed I only just realized we seem to be using Op as a short name for optimize. I find this very unintuitive. Can we spare another letter to make this GHC.Core.Opt instead? We use opt pretty much everywhere else in GHC already. Cheers Andreas

+1, i always think "opcode"
On Fri, Apr 3, 2020, 1:27 PM Andreas Klebinger
Hello devs,
While I looked at the renaming a bit when proposed I only just realized we seem to be using Op as a short name for optimize.
I find this very unintuitive. Can we spare another letter to make this GHC.Core.Opt instead?
We use opt pretty much everywhere else in GHC already.
Cheers Andreas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Hi Andreas, "Op" stands for "Operation" but it's not very obvious (ironically when I started this renaming work one of the motivation was to avoid ambiguous acronyms... failed). The idea was to separate Core types from Core transformations/analyses/passes. I couldn't find something better then "Operation" to sum up the latter category but I concede it's not very good. But perhaps we should do the opposite as we're doing in GHC.Tc: put all the Core types in GHC.Core.Types and move everything operation from GHC.Core.Op to GHC.Core? Cheers, Sylvain On 03/04/2020 22:26, Andreas Klebinger wrote:
Hello devs,
While I looked at the renaming a bit when proposed I only just realized we seem to be using Op as a short name for optimize.
I find this very unintuitive. Can we spare another letter to make this GHC.Core.Opt instead?
We use opt pretty much everywhere else in GHC already.
Cheers Andreas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Thanks for the response Sylvain.
put all the Core types in GHC.Core.Types and move everything operation from GHC.Core.Op to GHC.Core?
That would work as well. But I still favour the renaming approach. Almost all of these passes are optimization, and the few who are not are just there to support the optimizations so their placements still makes sense. To me anyway. If people reject the renaming your suggestion would still be an improvement over .Op though. Cheers, Andreas Sylvain Henry schrieb am 03.04.2020 um 23:29:
Hi Andreas,
"Op" stands for "Operation" but it's not very obvious (ironically when I started this renaming work one of the motivation was to avoid ambiguous acronyms... failed).
The idea was to separate Core types from Core transformations/analyses/passes. I couldn't find something better then "Operation" to sum up the latter category but I concede it's not very good.
But perhaps we should do the opposite as we're doing in GHC.Tc: put all the Core types in GHC.Core.Types and move everything operation from GHC.Core.Op to GHC.Core?
Cheers, Sylvain
On 03/04/2020 22:26, Andreas Klebinger wrote:
Hello devs,
While I looked at the renaming a bit when proposed I only just realized we seem to be using Op as a short name for optimize.
I find this very unintuitive. Can we spare another letter to make this GHC.Core.Opt instead?
We use opt pretty much everywhere else in GHC already.
Cheers Andreas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

That would work as well. But I still favour the renaming approach.
If no one opposes, I'll do the s/GHC.Core.Op/GHC.Core.Opt/ in the next renaming MR (after !2924 is merged). Cheers, Sylvain On 04/04/2020 14:56, Andreas Klebinger wrote:
Thanks for the response Sylvain.
put all the Core types in GHC.Core.Types and move everything operation from GHC.Core.Op to GHC.Core?
That would work as well. But I still favour the renaming approach.
Almost all of these passes are optimization, and the few who are not are just there to support the optimizations so their placements still makes sense. To me anyway.
If people reject the renaming your suggestion would still be an improvement over .Op though.
Cheers, Andreas
Sylvain Henry schrieb am 03.04.2020 um 23:29:
Hi Andreas,
"Op" stands for "Operation" but it's not very obvious (ironically when I started this renaming work one of the motivation was to avoid ambiguous acronyms... failed).
The idea was to separate Core types from Core transformations/analyses/passes. I couldn't find something better then "Operation" to sum up the latter category but I concede it's not very good.
But perhaps we should do the opposite as we're doing in GHC.Tc: put all the Core types in GHC.Core.Types and move everything operation from GHC.Core.Op to GHC.Core?
Cheers, Sylvain
On 03/04/2020 22:26, Andreas Klebinger wrote:
Hello devs,
While I looked at the renaming a bit when proposed I only just realized we seem to be using Op as a short name for optimize.
I find this very unintuitive. Can we spare another letter to make this GHC.Core.Opt instead?
We use opt pretty much everywhere else in GHC already.
Cheers Andreas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

I would vote against the GHC.Core.Types directory, because there is the potential for confusion with "types we are declaring" to "this stuff is about Haskell types". As I've posted elsewhere, I'm in strong support of separating definitions about Core from operations on Core. Originally, I thought GHC.Core.Pass would be a good alternative to GHC.Core.Op. Not sure why that was dropped. If all the passes really are optimizations (and why wouldn't they be?), then GHC.Core.Opt would be fine, too. Perhaps we should move GHC.Core.Coercion.Opt to the new place, regardless. Thanks! Richard
On Apr 5, 2020, at 4:57 PM, Sylvain Henry
wrote: That would work as well. But I still favour the renaming approach.
If no one opposes, I'll do the s/GHC.Core.Op/GHC.Core.Opt/ in the next renaming MR (after !2924 is merged).
Cheers, Sylvain
On 04/04/2020 14:56, Andreas Klebinger wrote:
Thanks for the response Sylvain.
put all the Core types in GHC.Core.Types and move everything operation from GHC.Core.Op to GHC.Core?
That would work as well. But I still favour the renaming approach.
Almost all of these passes are optimization, and the few who are not are just there to support the optimizations so their placements still makes sense. To me anyway.
If people reject the renaming your suggestion would still be an improvement over .Op though.
Cheers, Andreas
Sylvain Henry schrieb am 03.04.2020 um 23:29:
Hi Andreas,
"Op" stands for "Operation" but it's not very obvious (ironically when I started this renaming work one of the motivation was to avoid ambiguous acronyms... failed).
The idea was to separate Core types from Core transformations/analyses/passes. I couldn't find something better then "Operation" to sum up the latter category but I concede it's not very good.
But perhaps we should do the opposite as we're doing in GHC.Tc: put all the Core types in GHC.Core.Types and move everything operation from GHC.Core.Op to GHC.Core?
Cheers, Sylvain
On 03/04/2020 22:26, Andreas Klebinger wrote:
Hello devs,
While I looked at the renaming a bit when proposed I only just realized we seem to be using Op as a short name for optimize.
I find this very unintuitive. Can we spare another letter to make this GHC.Core.Opt instead?
We use opt pretty much everywhere else in GHC already.
Cheers Andreas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

I wondered that too. I'd be happy with "Opt" instead of "Op".
Simon
| -----Original Message-----
| From: ghc-devs
participants (5)
-
Andreas Klebinger
-
chessai .
-
Richard Eisenberg
-
Simon Peyton Jones
-
Sylvain Henry