Changes to primops break libraries (was Re: 7.8 Feature window)
Jan Stolarek
jan.stolarek at p.lodz.pl
Thu Aug 22 19:19:46 CEST 2013
Sure. I considered that idea at some point but it seemed a bit to drastic.
Janek
----- Oryginalna wiadomość -----
Od: "Simon Peyton-Jones" <simonpj at microsoft.com>
Do: "Geoffrey Mainland" <mainland at apeiron.net>, "Jan Stolarek" <jan.stolarek at p.lodz.pl>
DW: ghc-devs at haskell.org
Wysłane: czwartek, 22 sierpień 2013 17:57:48
Temat: RE: Changes to primops break libraries (was Re: 7.8 Feature window)
I think that's a pretty good idea. It's not just a hack... it makes sense even if you ignore the issues of managing the transition.
Maybe GHC.Prim.Builtin for the machine-generated not-written-in-Haskell operations.
Jan would you like to try it?
Simon
| -----Original Message-----
| From: Geoffrey Mainland [mailto:mainland at apeiron.net]
| Sent: 22 August 2013 16:18
| To: Jan Stolarek
| Cc: Simon Peyton-Jones; ghc-devs at haskell.org
| Subject: Re: Changes to primops break libraries (was Re: 7.8 Feature
| window)
|
| This is not a completely serious suggestions, but... If we moved the
| magic GHC.Prim module to GHC.Prim.Base or something, then we could move
| GHC.PrimWrappers to GHC.Prim, have it import GHC.Prim.Base, and,
| assuming that we use Simon PJ's naming convention, (I think) no code
| would have to change.
|
| Geoff
|
| On 08/22/2013 03:49 PM, Jan Stolarek wrote:
| > I created a wiki page that describes the upgrade process in two easy
| steps:
| >
| > http://ghc.haskell.org/trac/ghc/wiki/NewPrimopsInGHC7.8
| >
| > I also added link to this page in the release notes. Simon, does this
| address points 3 & 4 of your mail? Of course aside from the fact that if
| we change name of GHC.PrimWrappers module than these page will need to
| be updated accordingly.
| >
| > Janek
| >
| > ----- Oryginalna wiadomość -----
| > Od: "Simon Peyton-Jones" <simonpj at microsoft.com>
| > Do: "Jan Stolarek" <jan.stolarek at p.lodz.pl>, "Gabor Greif"
| <ggreif at gmail.com>
| > DW: ghc-devs at haskell.org
| > Wysłane: czwartek, 22 sierpień 2013 13:40:09
| > Temat: RE: Changes to primops break libraries (was Re: 7.8 Feature
| window)
| >
| > Jan
| >
| > Four things:
| >
| > | •Six primops are an exception to the rules above: sameMutableArray#,
| > | sameMutableByteArray#, sameMutableArrayArray#, sameMutVar#,
| sameMVar#
| > | and sameTVar#. Their names have remained the same as before and new
| > | wrappers created for them lack # at the end of their name. We made
| that
| > | decission because this naming feels more consistent and these
| primops
| > | are rarely used so we expect that they won't break a lot of existing
| > | code.
| >
| > 1. Why do you say "this naming feels more consistent"? Consistent
| with what? I'd expect sameTVar# to return a Bool, just like ==#.
| >
| > I'd prefer to say "just import PrimWrappers" than to say "just import
| PrimWrapper and change the names of these six functions". I don’t
| really see a clear distinction at all.
| >
| > 2. The module name PrimWrappers is terrible, because it's so close to
| PrimopWrappers, which is machine generated. Lots of scope for confusion.
| How about CmpOpWrappers or BoolOpWrappers? Any opinions from other ghc-
| devs?
| >
| > 3. Could you add a section "Breaking changes" to
| http://ghc.haskell.org/trac/ghc/wiki/PrimBool to explain what to change.
| Currently it's buried (in bold I know) in "Implementation details" which
| is not where I'd look as a library author.
| >
| > 4. Can the release notes
| http://ghc.haskell.org/trac/ghc/browser/docs/users_guide/7.8.1-notes.xml
| perhaps refer to the wiki page? That gives much more background.
| Library authors will find that helpful.
| >
| > So long as we get these choices fixed for 7.8 we are fine.
| >
| > Simon
| >
| > _______________________________________________
| > ghc-devs mailing list
| > ghc-devs at haskell.org
| > http://www.haskell.org/mailman/listinfo/ghc-devs
More information about the ghc-devs
mailing list