Commits

Meikel Brandmeyer  committed 137b689

Add bencode writer for ResponseMap

  • Participants
  • Parent commits 6244129

Comments (0)

Files changed (1)

File nrepl-client/src/main/haskell/VimClojure/Client.hs

                  (fromBencode $ findWithDefault emptyString nsKey this)
                  (fromBencode $ findWithDefault emptyList statusKey this)
 
+instance IsBencodeWritable ResponseMap where
+    toBencode (Response out err value ns status) =
+        BMap $
+        fromList [(outKey,    toBencode out),
+                  (errKey,    toBencode err),
+                  (valueKey,  toBencode value),
+                  (nsKey,     toBencode ns),
+                  (statusKey, toBencode status)]
+
 emptyResponse = Response "" "" "" "" []
 
 readToken stream = do