Skip to content

Can we remove RemoteTable? #402

Open

Description

@gbaz

Now that there are proper static pointers in ghc, is the remotetable necessary, or can it just be eliminated?

Activity

  1. facundominguez commented on Jul 25, 2018

    @facundominguez
    Contributor

    The keys in the remote table are more stable across builds than static pointers. There might be use cases where this matters. That's the only concern I'm aware of.

  2. hyperthunk commented on Nov 6, 2018

    @hyperthunk
    Member

    Hmmm. Would be really interesting to see how this will affect the rest of cloud haskell libraries... Do we have a lot of folks that require compatibility with earlier versions of ghc?

  3. infinity0 commented on Apr 6, 2020

    @infinity0

    Hi, I am not a distributed-haskell / Cloud Haskell user, but I found this package when looking around for anything that could effectively perform automatic defunctionalisation, since I want to be able to suspend execution, serialise the state, potentially send it elsewhere, and resume it. For a complex program this often means I have to be able to serialise a closure, that was stored e.g. for a Promise or a continuation or something.

    One nice consequence of having more stable names, is you can suspend execution state, then upgrade your code, and then resume your execution from the same state, but now running e.g. a bugfixed version of a closure. So even if nobody is using this today, I'd like to voice my support in keeping this feature for this reason - or else forking this library and retaining this feature, for general non-Cloud-Haskell users - I think it's a useful feature that someone could want some day.

    I was actually a bit surprised to find that GHC's own implementation of static pointers does not have this property - on http://hackage.haskell.org/package/base/docs/GHC-StaticPtr.html it says "Only processes launched from the same program binary are guaranteed to use the same set of keys" which IMO is hugely restrictive, although perhaps it makes low-level implementation easier. So it seems this library is a good high-level wrapper around that, that provides stability of RemoteTable keys.

    (This restriction is somewhat clear from the code - GHC.StaticKey is an alias for GHC.Fingerprint.Type.Fingerprint which is two Word64 presumably globally-generated by the compiler via some opaque algorithm.)

  4. LaurentRDC commented on Sep 6, 2024

    @LaurentRDC
    Member

    The new minimum GHC version is 8.10 (base 4.14), which has support for StaticPtr.

    I might get to this eventually, but I am also happy to review pull requests

  5. LaurentRDC commented on Oct 13, 2026

    @LaurentRDC
    Member

    GHC 10 brings several bug fixes related to static pointers, as well as a better, slightly narrower definition for them. I took the opportunity to remove RemoteTable in #493 for the occasion.

    If you're interested, I would love a review!

  6. linked a pull request that will close this issueLean into static pointers #493on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions