Merge pull request #637 from nicluo/master

Fix #632: Show "Current Kernel Information" in Jupyter Notebook About
This commit is contained in:
Sumit Sahrawat 2016-02-09 22:02:10 +00:00
commit d1c84ee2d3
3 changed files with 6 additions and 1 deletions

View File

@ -25,7 +25,8 @@ instance ToJSON LanguageInfo where
instance ToJSON Message where
toJSON rep@KernelInfoReply{} =
object
[ "protocol_version" .= string "5.0" -- current protocol version, major and minor
[ "protocol_version" .= protocolVersion rep
, "banner" .= banner rep
, "implementation" .= implementation rep
, "implementation_version" .= implementationVersion rep
, "language_info" .= languageInfo rep

View File

@ -287,6 +287,8 @@ data Message =
-- | A response to a KernelInfoRequest.
KernelInfoReply
{ 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)
, implementation :: String -- ^ e.g. IHaskell
, implementationVersion :: String -- ^ The version of the implementation
, languageInfo :: LanguageInfo

View File

@ -239,6 +239,8 @@ replyTo _ KernelInfoRequest{} replyHeader state =
return
(state, KernelInfoReply
{ header = replyHeader
, protocolVersion = "5.0"
, banner = "IHaskell " ++ VERSION_ipython_kernel ++ " GHC " ++ VERSION_ghc
, implementation = "IHaskell"
, implementationVersion = VERSION_ipython_kernel
, languageInfo = LanguageInfo