Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains all types used to create an IPython language kernel.
Synopsis
- data Profile = Profile {}
- data Transport = TCP
- type Port = Int
- type IP = String
- data KernelSpec = KernelSpec {}
- data Message
- = KernelInfoRequest { }
- | KernelInfoReply { }
- | CommInfoRequest { }
- | CommInfoReply { }
- | ExecuteInput { }
- | ExecuteRequest {
- header :: MessageHeader
- getCode :: Text
- getSilent :: Bool
- getStoreHistory :: Bool
- getAllowStdin :: Bool
- getUserVariables :: [Text]
- getUserExpressions :: [Text]
- | ExecuteReply { }
- | ExecuteResult { }
- | ExecuteError { }
- | PublishStatus { }
- | PublishStream { }
- | PublishDisplayData { }
- | PublishUpdateDisplayData { }
- | PublishOutput { }
- | PublishInput {
- header :: MessageHeader
- inCode :: String
- executionCount :: Int
- | Input {
- header :: MessageHeader
- getCode :: Text
- executionCount :: Int
- | Output {
- header :: MessageHeader
- getText :: [DisplayData]
- executionCount :: Int
- | IsCompleteRequest { }
- | IsCompleteReply { }
- | CompleteRequest {
- header :: MessageHeader
- getCode :: Text
- getCursorPos :: Int
- | CompleteReply { }
- | InspectRequest { }
- | InspectReply { }
- | ShutdownRequest { }
- | ShutdownReply { }
- | ClearOutput {
- header :: MessageHeader
- wait :: Bool
- | RequestInput { }
- | InputReply { }
- | CommOpen { }
- | CommData { }
- | CommClose { }
- | HistoryRequest { }
- | HistoryReply { }
- | SendNothing
- data MessageHeader = MessageHeader {}
- type Username = Text
- newtype Transient = Transient {}
- data MessageType
- = KernelInfoReplyMessage
- | KernelInfoRequestMessage
- | ExecuteInputMessage
- | ExecuteReplyMessage
- | ExecuteErrorMessage
- | ExecuteRequestMessage
- | ExecuteResultMessage
- | StatusMessage
- | StreamMessage
- | DisplayDataMessage
- | UpdateDisplayDataMessage
- | OutputMessage
- | InputMessage
- | IsCompleteRequestMessage
- | IsCompleteReplyMessage
- | CompleteRequestMessage
- | CompleteReplyMessage
- | InspectRequestMessage
- | InspectReplyMessage
- | ShutdownRequestMessage
- | ShutdownReplyMessage
- | ClearOutputMessage
- | InputRequestMessage
- | InputReplyMessage
- | CommOpenMessage
- | CommDataMessage
- | CommInfoRequestMessage
- | CommInfoReplyMessage
- | CommCloseMessage
- | HistoryRequestMessage
- | HistoryReplyMessage
- data CodeReview
- type Width = Int
- type Height = Int
- data StreamType
- data ExecutionState
- data ExecuteReplyStatus
- data HistoryAccessType
- data HistoryReplyElement = HistoryReplyElement {}
- data LanguageInfo = LanguageInfo {}
- newtype Metadata = Metadata Object
- replyType :: MessageType -> Maybe MessageType
- showMessageType :: MessageType -> String
- data DisplayData = DisplayData MimeType Text
- data MimeType
- extractPlain :: [DisplayData] -> String
- displayDataToJson :: DisplayData -> (Key, Value)
IPython kernel profile
A kernel profile, specifying how the kernel communicates.
Profile | |
|
The transport mechanism used to communicate with the IPython frontend.
TCP | Default transport mechanism via TCP. |
IPython kernelspecs
data KernelSpec Source #
KernelSpec | |
|
Instances
ToJSON KernelSpec Source # | |
Defined in IHaskell.IPython.Types toJSON :: KernelSpec -> Value # toEncoding :: KernelSpec -> Encoding # toJSONList :: [KernelSpec] -> Value # toEncodingList :: [KernelSpec] -> Encoding # | |
Show KernelSpec Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> KernelSpec -> ShowS # show :: KernelSpec -> String # showList :: [KernelSpec] -> ShowS # | |
Eq KernelSpec Source # | |
Defined in IHaskell.IPython.Types (==) :: KernelSpec -> KernelSpec -> Bool # (/=) :: KernelSpec -> KernelSpec -> Bool # |
IPython messaging protocol
A message used to communicate with the IPython frontend.
See https://jupyter-client.readthedocs.io/en/stable/messaging.html
KernelInfoRequest | A request from a frontend for information about the kernel. |
| |
KernelInfoReply | A response to a KernelInfoRequest. |
| |
CommInfoRequest | A request from a frontend for information about the comms. |
| |
CommInfoReply | A response to a CommInfoRequest. |
ExecuteInput | A request from a frontend to execute some code. |
| |
ExecuteRequest | A request from a frontend to execute some code. |
| |
ExecuteReply | A reply to an execute request. |
| |
ExecuteResult | A reply to an execute request. |
| |
ExecuteError | An error reply to an execute request |
PublishStatus | |
| |
PublishStream | |
| |
PublishDisplayData | |
| |
PublishUpdateDisplayData | |
| |
PublishOutput | |
| |
PublishInput | |
| |
Input | |
| |
Output | |
| |
IsCompleteRequest | |
| |
IsCompleteReply | |
| |
CompleteRequest | |
| |
CompleteReply | |
| |
InspectRequest | |
| |
InspectReply | |
| |
ShutdownRequest | |
| |
ShutdownReply | |
| |
ClearOutput | |
| |
RequestInput | |
| |
InputReply | |
| |
CommOpen | |
| |
CommData | |
CommClose | |
HistoryRequest | |
| |
HistoryReply | |
| |
SendNothing |
data MessageHeader Source #
A message header with some metadata.
MessageHeader | |
|
Instances
ToJSON MessageHeader Source # | |
Defined in IHaskell.IPython.Types toJSON :: MessageHeader -> Value # toEncoding :: MessageHeader -> Encoding # toJSONList :: [MessageHeader] -> Value # toEncodingList :: [MessageHeader] -> Encoding # | |
Read MessageHeader Source # | |
Defined in IHaskell.IPython.Types readsPrec :: Int -> ReadS MessageHeader # readList :: ReadS [MessageHeader] # | |
Show MessageHeader Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> MessageHeader -> ShowS # show :: MessageHeader -> String # showList :: [MessageHeader] -> ShowS # |
data MessageType Source #
The type of a message, corresponding to IPython message types.
Instances
FromJSON MessageType Source # | |
Defined in IHaskell.IPython.Types parseJSON :: Value -> Parser MessageType # parseJSONList :: Value -> Parser [MessageType] # | |
Read MessageType Source # | |
Defined in IHaskell.IPython.Types readsPrec :: Int -> ReadS MessageType # readList :: ReadS [MessageType] # readPrec :: ReadPrec MessageType # readListPrec :: ReadPrec [MessageType] # | |
Show MessageType Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # | |
Eq MessageType Source # | |
Defined in IHaskell.IPython.Types (==) :: MessageType -> MessageType -> Bool # (/=) :: MessageType -> MessageType -> Bool # |
data CodeReview Source #
CodeComplete | |
CodeIncomplete String | String to be used to indent next line of input |
CodeInvalid | |
CodeUnknown |
Instances
Show CodeReview Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> CodeReview -> ShowS # show :: CodeReview -> String # showList :: [CodeReview] -> ShowS # |
data StreamType Source #
Input and output streams.
Instances
FromJSON StreamType Source # | |
Defined in IHaskell.IPython.Types parseJSON :: Value -> Parser StreamType # parseJSONList :: Value -> Parser [StreamType] # | |
ToJSON StreamType Source # | Print a stream as "stdin" or "stdout" strings. |
Defined in IHaskell.IPython.Types toJSON :: StreamType -> Value # toEncoding :: StreamType -> Encoding # toJSONList :: [StreamType] -> Value # toEncodingList :: [StreamType] -> Encoding # | |
Show StreamType Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> StreamType -> ShowS # show :: StreamType -> String # showList :: [StreamType] -> ShowS # |
data ExecutionState Source #
The execution state of the kernel.
Instances
FromJSON ExecutionState Source # | |
Defined in IHaskell.IPython.Types parseJSON :: Value -> Parser ExecutionState # parseJSONList :: Value -> Parser [ExecutionState] # | |
ToJSON ExecutionState Source # | Print an execution state as "busy", "idle", or "starting". |
Defined in IHaskell.IPython.Types toJSON :: ExecutionState -> Value # toEncoding :: ExecutionState -> Encoding # toJSONList :: [ExecutionState] -> Value # toEncodingList :: [ExecutionState] -> Encoding # | |
Show ExecutionState Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> ExecutionState -> ShowS # show :: ExecutionState -> String # showList :: [ExecutionState] -> ShowS # |
data ExecuteReplyStatus Source #
Possible statuses in the execution reply messages.
Instances
FromJSON ExecuteReplyStatus Source # | |
Defined in IHaskell.IPython.Types parseJSON :: Value -> Parser ExecuteReplyStatus # parseJSONList :: Value -> Parser [ExecuteReplyStatus] # | |
Show ExecuteReplyStatus Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> ExecuteReplyStatus -> ShowS # show :: ExecuteReplyStatus -> String # showList :: [ExecuteReplyStatus] -> ShowS # |
data HistoryAccessType Source #
Ways in which the frontend can request history. TODO: Implement fields as described in messaging spec.
Instances
Show HistoryAccessType Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> HistoryAccessType -> ShowS # show :: HistoryAccessType -> String # showList :: [HistoryAccessType] -> ShowS # | |
Eq HistoryAccessType Source # | |
Defined in IHaskell.IPython.Types (==) :: HistoryAccessType -> HistoryAccessType -> Bool # (/=) :: HistoryAccessType -> HistoryAccessType -> Bool # |
data HistoryReplyElement Source #
Reply to history requests.
Instances
Show HistoryReplyElement Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> HistoryReplyElement -> ShowS # show :: HistoryReplyElement -> String # showList :: [HistoryReplyElement] -> ShowS # | |
Eq HistoryReplyElement Source # | |
Defined in IHaskell.IPython.Types (==) :: HistoryReplyElement -> HistoryReplyElement -> Bool # (/=) :: HistoryReplyElement -> HistoryReplyElement -> Bool # |
data LanguageInfo Source #
Kernel language info, see
LanguageInfo | |
|
Instances
ToJSON LanguageInfo Source # | |
Defined in IHaskell.IPython.Types toJSON :: LanguageInfo -> Value # toEncoding :: LanguageInfo -> Encoding # toJSONList :: [LanguageInfo] -> Value # toEncodingList :: [LanguageInfo] -> Encoding # | |
Show LanguageInfo Source # | |
Defined in IHaskell.IPython.Types showsPrec :: Int -> LanguageInfo -> ShowS # show :: LanguageInfo -> String # showList :: [LanguageInfo] -> ShowS # | |
Eq LanguageInfo Source # | |
Defined in IHaskell.IPython.Types (==) :: LanguageInfo -> LanguageInfo -> Bool # (/=) :: LanguageInfo -> LanguageInfo -> Bool # |
A metadata dictionary.
replyType :: MessageType -> Maybe MessageType Source #
Get the reply message type for a request message type.
showMessageType :: MessageType -> String Source #
IPython display data message
data DisplayData Source #
Data for display: a string with associated MIME type.
Instances
Instances
extractPlain :: [DisplayData] -> String Source #
displayDataToJson :: DisplayData -> (Key, Value) Source #
Convert a MIME type and value into a JSON dictionary pair.