From eedb3df0c1c28a7abc43705d614239c1c6199a1f Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 1 Feb 2017 23:39:52 -0500 Subject: Add support for StaticPointers in GHCi Here we add support to GHCi for StaticPointers. This process begins by adding remote GHCi messages for adding entries to the static pointer table. We then collect binders needing SPT entries after linking and send the interpreter a message adding entries with the appropriate fingerprints. Test Plan: `make test TEST=StaticPtr` Reviewers: facundominguez, mboes, simonpj, simonmar, goldfire, austin, hvr, erikd Reviewed By: simonpj, simonmar Subscribers: RyanGlScott, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2504 GHC Trac Issues: #12356 --- docs/users_guide/8.2.1-notes.rst | 3 +++ docs/users_guide/glasgow_exts.rst | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'docs') diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst index f81c3995e0..d29914a100 100644 --- a/docs/users_guide/8.2.1-notes.rst +++ b/docs/users_guide/8.2.1-notes.rst @@ -145,6 +145,9 @@ GHCi - Added :ghc-flag:`-flocal-ghci-history` which uses current directory for `.ghci-history`. +- Added support for :ghc-flag:`-XStaticPointers` in interpreted modules. Note, however, + that ``static`` expressions are still not allowed in expressions evaluated in the REPL. + Template Haskell ~~~~~~~~~~~~~~~~ diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index 0bbf6588cc..c2d8437303 100644 --- a/docs/users_guide/glasgow_exts.rst +++ b/docs/users_guide/glasgow_exts.rst @@ -11984,6 +11984,13 @@ While the following definitions are rejected: :: ref8 (y :: a) = let x = undefined :: a in static x -- x has a non-closed type +.. note:: + + While modules loaded in GHCi with the :ghci-cmd:`:load` command may use + :ghc-flag:`-XStaticPointers` and ``static`` expressions, statements + entered on the REPL may not. This is a limitation of GHCi; see + :ghc-ticket:`12356` for details. + .. _typechecking-static-pointers: Static semantics of static pointers -- cgit v1.2.1