summaryrefslogtreecommitdiff
path: root/iserv
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-06-23 09:22:32 +0100
committerSimon Marlow <marlowsd@gmail.com>2016-06-24 11:29:33 +0100
commiteb732195f6c005c769232a79e5d17e3d768603d1 (patch)
treeaf50965f6f74f524d0552c66140cb5982a6dcfd6 /iserv
parentbdb0d24be9c83b08fd3f4b870a17f6be31a24b1b (diff)
downloadhaskell-eb732195f6c005c769232a79e5d17e3d768603d1.tar.gz
Remote GHCi: comments only
Summary: Add more Notes and signposts across the codebase to help navigation. Test Plan: validate Reviewers: goldfire, simonpj, austin, ezyang, hvr, bgamari, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2358
Diffstat (limited to 'iserv')
-rw-r--r--iserv/src/Main.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/iserv/src/Main.hs b/iserv/src/Main.hs
index 2e4555b017..3fcd49f5c7 100644
--- a/iserv/src/Main.hs
+++ b/iserv/src/Main.hs
@@ -1,4 +1,11 @@
{-# LANGUAGE RecordWildCards, GADTs, ScopedTypeVariables, RankNTypes #-}
+
+-- |
+-- The Remote GHCi server.
+--
+-- For details on Remote GHCi, see Note [Remote GHCi] in
+-- compiler/ghci/GHCi.hs.
+--
module Main (main) where
import GHCi.Run
@@ -55,6 +62,10 @@ serv verbose pipe@Pipe{..} restore = loop
writePipe pipe (put r)
loop
+ -- Run some TH code, which may interact with GHC by sending
+ -- THMessage requests, and then finally send RunTHDone followed by a
+ -- QResult. For an overview of how TH works with Remote GHCi, see
+ -- Note [Remote Template Haskell] in libraries/ghci/GHCi/TH.hs.
wrapRunTH :: forall a. (Binary a, Show a) => IO a -> IO ()
wrapRunTH io = do
r <- try io