
#8711: StaticValues language extension -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez facundo.dominguez | Status: new Type: feature request | Milestone: Priority: normal | Version: Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: Unknown/Multiple | Difficulty: Project (more Type of failure: None/Unknown | than a week) Test Case: | Blocked By: Blocking: | Related Tickets: #8107 -------------------------------------+------------------------------------- Changes (by carter): * related: => #8107 Comment: This is somewhat related to my own static data work in-progress. I think that with GHC 7.8, it'd be possible (and valuable) to prototype this proposal as a userland library. Theres a LOT of corner cases that would need to be very very precisely / throughly handled for this to be worth supporting in ghc proper, and I very strongly suspect that with the right (seemingly unrelated) extensions, it'd actually be quite feasible to make this feature request a user land library. namely: making sure that GHC API tooling for supporting dynamic loading and unloading of code works for this use case! see the ObjLink api http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-7.6.3/ObjLink.html and http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-7.6.3/DynamicLoadi... works or not. Mind you, I'd recommend testing out the GHC HEAD / 7.8 variant of the api, because there were a few known issues in 7.6. Theres also some ideas for doing idris style EDSL support (which would kinda look like doing statically typed quasiquoters for haskell expressions) that would support this and a few other use cases quite nicely I think. I understand and appreciate the end goal. I think that the current GHC APIs are enough to support this or something very close to it as a user land library. I'd also say that it'd be instructive to have some very very concrete examples illustrating what (if anything) can't be done currently from a userland perspective. I know for a fact that a number of organizations are using the Obj Loading facilities, or abstractions on top thereof, such as the hint lib http://hackage.haskell.org/package/hint to provide such "computation serialization". These organizations include, but are not limited to Facebook and Soostone. If you have some examples that aren't viable with such an approach, and/or would be much much nicer in your proposed scheme, please share! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8711#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler