diff options
Diffstat (limited to 'Remote/External/Types.hs')
-rw-r--r-- | Remote/External/Types.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs index 873c5c438..4000f3f49 100644 --- a/Remote/External/Types.hs +++ b/Remote/External/Types.hs @@ -18,6 +18,7 @@ module Remote.External.Types ( Sendable(..), Receivable(..), Request(..), + needsPREPARE, Response(..), RemoteRequest(..), RemoteResponse(..), @@ -60,6 +61,7 @@ data ExternalState = ExternalState { externalSend :: Handle , externalReceive :: Handle , externalPid :: ProcessHandle + , externalPrepared :: Bool } -- Constructor is not exported, and only created by newExternal. @@ -98,6 +100,12 @@ data Request | REMOVE Key deriving (Show) +-- Does PREPARE need to have been sent before this request? +needsPREPARE :: Request -> Bool +needsPREPARE PREPARE = False +needsPREPARE INITREMOTE = False +needsPREPARE _ = True + instance Sendable Request where formatMessage PREPARE = ["PREPARE"] formatMessage INITREMOTE = ["INITREMOTE"] |