Module Renaming: GHC.Core.Op

Richard Eisenberg rae at richarde.dev
Mon Apr 6 08:32:36 UTC 2020


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 <sylvain at haskus.fr> 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 at haskell.org
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>>> _______________________________________________
>>> ghc-devs mailing list
>>> ghc-devs at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>> 
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs



More information about the ghc-devs mailing list