From 23f206cf1fa9e4e9398aba47707024368c13ca60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 7 Oct 2022 11:38:01 +0200 Subject: Process node record accessor --- src/Process.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Process.hs') diff --git a/src/Process.hs b/src/Process.hs index 04c5076..0a2c861 100644 --- a/src/Process.hs +++ b/src/Process.hs @@ -7,6 +7,7 @@ module Process ( closeProcess, ) where +import Control.Arrow import Control.Concurrent.STM import Control.Monad.Except @@ -20,6 +21,7 @@ import System.IO import System.Posix.Signals import System.Process +import Network import Output import Test @@ -29,6 +31,7 @@ data Process = Process , procStdin :: Handle , procOutput :: TVar [Text] , procKillWith :: Maybe Signal + , procNode :: Node } instance Eq Process where @@ -37,7 +40,11 @@ instance Eq Process where instance ExprType Process where textExprType _ = T.pack "proc" textExprValue n = T.pack "p:" <> textProcName (procName n) - emptyVarValue = Process (ProcName T.empty) undefined undefined undefined undefined + emptyVarValue = Process (ProcName T.empty) undefined undefined undefined undefined emptyVarValue + + recordMembers = map (first T.pack) + [ ("node", RecordSelector $ procNode) + ] data ProcName = ProcName Text -- cgit v1.2.3