1
0
mirror of https://github.com/IHaskell/IHaskell.git synced 2025-04-19 12:56:08 +00:00

Add banner to KernelInfoReply

This commit is contained in:
Nicholas Luo 2016-02-09 22:25:07 +08:00
parent 3385558465
commit 05100fe640
3 changed files with 3 additions and 0 deletions
ipython-kernel/src/IHaskell/IPython
main

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

@ -287,6 +287,7 @@ data Message =
-- | A response to a KernelInfoRequest.
KernelInfoReply
{ header :: MessageHeader
, 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

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