[GHC] #14770: Allow static pointer expressions to have static pointer free variables
GHC
ghc-devs at haskell.org
Wed Jul 25 20:06:43 UTC 2018
#14770: Allow static pointer expressions to have static pointer free variables
-------------------------------------+-------------------------------------
Reporter: TheKing01 | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
| StaticPointers
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by gershomb):
No concrete use-case at the moment (in that I'm not working on a system
that does cloud distribution). I wanted to track this ticket as I've been
thinking a lot about questions related to this ticket, including possible
other uses for `static` and how it relates to Contextual Modal Type Theory
(and also the question of staging).
I think the ticket has the right of it in terms of the problem.
Semantically, the "correct" thing to do is, treating `StaticPtr` as a
modality, allow computation _within_ the modality such that we have
`StaticPtr (a -> b) -> StaticPtr a -> StaticPtr b` directly. Instead, we
have the workaround the ticket points to, which makes use of an opaque
GADT. So that means, as the ticket says, this gives (on its own) a
potential efficiency gain, but not expressivity gain.
I think we'll need more people using static pointers "at scale" to see if
the efficiency cost becomes a genuine pain point.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14770#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list