@@ -65,6 +65,7 @@ module ProjectM36.Client
6565 AttributeExprBase(..),
6666 TypeConstructor(..),
6767 RequestTimeoutException(..),
68+ RemoteProcessDiedException(..),
6869 AtomType(..)) where
6970import ProjectM36.Base hiding (inclusionDependencies) --defined in this module as well
7071import qualified ProjectM36.Base as B
@@ -127,6 +128,11 @@ emptyNotificationCallback _ _ = pure ()
127128
128129type GhcPkgPath = String
129130
131+data RemoteProcessDiedException = RemoteProcessDiedException
132+ deriving (Show, Eq)
133+
134+instance Exception RemoteProcessDiedException
135+
130136data RequestTimeoutException = RequestTimeoutException
131137 deriving (Show, Eq)
132138
@@ -423,6 +429,7 @@ remoteCall (RemoteProcessConnection conf) arg = runProcessResult localNode $ do
423429 Left err -> error ("server died: " ++ show err)
424430 Right ret' -> case ret' of
425431 Left RequestTimeoutError -> liftIO (throwIO RequestTimeoutException)
432+ Left (ProcessDiedError _) -> liftIO (throwIO RemoteProcessDiedException)
426433 Right val -> pure val
427434 where
428435 localNode = rLocalNode conf