Cloud Haskell & Static Pointers

7 views
Skip to first unread message

Tim Watson

unread,
Nov 7, 2018, 4:45:48 AM11/7/18
to cloud-haskel...@googlegroups.com, parallel...@googlegroups.com
Hi Folks,

After several repeated, lengthy absences, I am once again dipping my toes back into Cloud Haskell development. Since static pointers were added to ghc, are there now new (and better) options for creating closures in cloud haskell, that will allow me to avoid using TH? If so, are there any docs, blog posts, etc, that I can look at to pick up how these work?

Cheers,
Tim

Boespflug, Mathieu

unread,
Nov 7, 2018, 5:13:43 AM11/7/18
to Tim Watson, cloud-haskel...@googlegroups.com, parallel...@googlegroups.com
Hi Tim,

there are two implementations of shippable closures on top of static pointers:

- distributed-closure (see
http://hackage.haskell.org/package/distributed-closure)
- distributed-static (I don't know where to find the version with
static pointer support, but Edsko alludes to it in a talk).

This latter one is already what distributed-process is using
internally, though without using the static pointers bit (hence TH
still required).

There is a blog post about this stuff:
https://ocharles.org.uk/guest-posts/2014-12-23-static-pointers.html.
And there's a talk too (by Edsko):
https://skillsmatter.com/skillscasts/10632-static-pointers-closures-and-polymorphism.

Best,

--
Mathieu Boespflug
Founder at http://tweag.io.
> --
> You received this message because you are subscribed to the Google Groups "parallel-haskell" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to parallel-haske...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Tim Watson

unread,
Nov 7, 2018, 5:14:43 AM11/7/18
to Mathieu Boespflug, cloud-haskel...@googlegroups.com, parallel...@googlegroups.com
Thanks, I'll check them out!

Tim

Edsko de Vries

unread,
Nov 7, 2018, 5:25:31 AM11/7/18
to watson....@gmail.com, Mathieu Boespflug, cloud-haskel...@googlegroups.com, parallel...@googlegroups.com

"The version with the static pointer support" is just the standard http://hackage.haskell.org/package/distributed-static package :)

-E

Boespflug, Mathieu

unread,
Nov 7, 2018, 6:18:52 AM11/7/18
to Edsko de Vries, Tim Watson, cloud-haskel...@googlegroups.com, parallel...@googlegroups.com
Ah, got it. I didn't notice the crucial `staticPtr` function at first
glance in the Haddocks. It makes a `Static` out of a `StaticPtr`. And
it's been there since 0.3.4.0.
Reply all
Reply to author
Forward
0 new messages