Commit a76d3b82 authored by Nicholas Luo's avatar Nicholas Luo

Combine protocol version with rest of kernel info

parent 05100fe6
...@@ -25,7 +25,7 @@ instance ToJSON LanguageInfo where ...@@ -25,7 +25,7 @@ instance ToJSON LanguageInfo where
instance ToJSON Message where instance ToJSON Message where
toJSON rep@KernelInfoReply{} = toJSON rep@KernelInfoReply{} =
object object
[ "protocol_version" .= string "5.0" -- current protocol version, major and minor [ "protocol_version" .= protocolVersion rep
, "banner" .= banner rep , "banner" .= banner rep
, "implementation" .= implementation rep , "implementation" .= implementation rep
, "implementation_version" .= implementationVersion rep , "implementation_version" .= implementationVersion rep
......
...@@ -287,6 +287,7 @@ data Message = ...@@ -287,6 +287,7 @@ data Message =
-- | A response to a KernelInfoRequest. -- | A response to a KernelInfoRequest.
KernelInfoReply KernelInfoReply
{ header :: MessageHeader { header :: MessageHeader
, protocolVersion :: String -- ^ current protocol version, major and minor
, banner :: String -- ^ Kernel information description e.g. (IHaskell 0.8.3.0 GHC 7.10.2) , banner :: String -- ^ Kernel information description e.g. (IHaskell 0.8.3.0 GHC 7.10.2)
, implementation :: String -- ^ e.g. IHaskell , implementation :: String -- ^ e.g. IHaskell
, implementationVersion :: String -- ^ The version of the implementation , implementationVersion :: String -- ^ The version of the implementation
......
...@@ -239,6 +239,7 @@ replyTo _ KernelInfoRequest{} replyHeader state = ...@@ -239,6 +239,7 @@ replyTo _ KernelInfoRequest{} replyHeader state =
return return
(state, KernelInfoReply (state, KernelInfoReply
{ header = replyHeader { header = replyHeader
, protocolVersion = "5.0"
, banner = "IHaskell " ++ VERSION_ipython_kernel ++ " GHC " ++ VERSION_ghc , banner = "IHaskell " ++ VERSION_ipython_kernel ++ " GHC " ++ VERSION_ghc
, implementation = "IHaskell" , implementation = "IHaskell"
, implementationVersion = VERSION_ipython_kernel , implementationVersion = VERSION_ipython_kernel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment