| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
IHaskell.IPython.Types
Description
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.
Constructors
| Profile | |
Fields
| |
The transport mechanism used to communicate with the IPython frontend.
Constructors
| TCP | Default transport mechanism via TCP. |
IPython kernelspecs
data KernelSpec Source #
Constructors
| KernelSpec | |
Fields
| |
Instances
| ToJSON KernelSpec Source # | |
Defined in IHaskell.IPython.Types Methods toJSON :: KernelSpec -> Value # toEncoding :: KernelSpec -> Encoding # toJSONList :: [KernelSpec] -> Value # toEncodingList :: [KernelSpec] -> Encoding # | |
| Show KernelSpec Source # | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> KernelSpec -> ShowS # show :: KernelSpec -> String # showList :: [KernelSpec] -> ShowS # | |
| Eq KernelSpec Source # | |
Defined in IHaskell.IPython.Types | |
IPython messaging protocol
A message used to communicate with the IPython frontend.
See https://jupyter-client.readthedocs.io/en/stable/messaging.html
Constructors
| KernelInfoRequest | A request from a frontend for information about the kernel. |
Fields
| |
| KernelInfoReply | A response to a KernelInfoRequest. |
Fields
| |
| CommInfoRequest | A request from a frontend for information about the comms. |
Fields
| |
| CommInfoReply | A response to a CommInfoRequest. |
| ExecuteInput | A request from a frontend to execute some code. |
Fields
| |
| ExecuteRequest | A request from a frontend to execute some code. |
Fields
| |
| ExecuteReply | A reply to an execute request. |
Fields
| |
| ExecuteResult | A reply to an execute request. |
Fields
| |
| ExecuteError | An error reply to an execute request |
| PublishStatus | |
Fields
| |
| PublishStream | |
Fields
| |
| PublishDisplayData | |
Fields
| |
| PublishUpdateDisplayData | |
Fields
| |
| PublishOutput | |
Fields
| |
| PublishInput | |
Fields
| |
| Input | |
Fields
| |
| Output | |
Fields
| |
| IsCompleteRequest | |
Fields
| |
| IsCompleteReply | |
Fields
| |
| CompleteRequest | |
Fields
| |
| CompleteReply | |
Fields
| |
| InspectRequest | |
Fields
| |
| InspectReply | |
Fields
| |
| ShutdownRequest | |
Fields
| |
| ShutdownReply | |
Fields
| |
| ClearOutput | |
Fields
| |
| RequestInput | |
Fields
| |
| InputReply | |
Fields
| |
| CommOpen | |
Fields
| |
| CommData | |
| CommClose | |
| HistoryRequest | |
Fields
| |
| HistoryReply | |
Fields
| |
| SendNothing | |
data MessageHeader Source #
A message header with some metadata.
Constructors
| MessageHeader | |
Fields
| |
Instances
| ToJSON MessageHeader Source # | |
Defined in IHaskell.IPython.Types Methods toJSON :: MessageHeader -> Value # toEncoding :: MessageHeader -> Encoding # toJSONList :: [MessageHeader] -> Value # toEncodingList :: [MessageHeader] -> Encoding # | |
| Read MessageHeader Source # | |
Defined in IHaskell.IPython.Types Methods readsPrec :: Int -> ReadS MessageHeader # readList :: ReadS [MessageHeader] # | |
| Show MessageHeader Source # | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> MessageHeader -> ShowS # show :: MessageHeader -> String # showList :: [MessageHeader] -> ShowS # | |
Constructors
| Transient | |
Fields | |
data MessageType Source #
The type of a message, corresponding to IPython message types.
Constructors
Instances
| FromJSON MessageType Source # | |
Defined in IHaskell.IPython.Types | |
| Read MessageType Source # | |
Defined in IHaskell.IPython.Types Methods readsPrec :: Int -> ReadS MessageType # readList :: ReadS [MessageType] # readPrec :: ReadPrec MessageType # readListPrec :: ReadPrec [MessageType] # | |
| Show MessageType Source # | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # | |
| Eq MessageType Source # | |
Defined in IHaskell.IPython.Types | |
data CodeReview Source #
Constructors
| CodeComplete | |
| CodeIncomplete String | String to be used to indent next line of input |
| CodeInvalid | |
| CodeUnknown |
Instances
| Show CodeReview Source # | |
Defined in IHaskell.IPython.Types Methods 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 | |
| ToJSON StreamType Source # | Print a stream as "stdin" or "stdout" strings. |
Defined in IHaskell.IPython.Types Methods toJSON :: StreamType -> Value # toEncoding :: StreamType -> Encoding # toJSONList :: [StreamType] -> Value # toEncodingList :: [StreamType] -> Encoding # | |
| Show StreamType Source # | |
Defined in IHaskell.IPython.Types Methods 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 Methods 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 Methods toJSON :: ExecutionState -> Value # toEncoding :: ExecutionState -> Encoding # toJSONList :: [ExecutionState] -> Value # toEncodingList :: [ExecutionState] -> Encoding # | |
| Show ExecutionState Source # | |
Defined in IHaskell.IPython.Types Methods 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 Methods parseJSON :: Value -> Parser ExecuteReplyStatus # parseJSONList :: Value -> Parser [ExecuteReplyStatus] # | |
| Show ExecuteReplyStatus Source # | |
Defined in IHaskell.IPython.Types Methods 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.
Constructors
| HistoryRange | |
| HistoryTail | |
| HistorySearch |
Instances
| Show HistoryAccessType Source # | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> HistoryAccessType -> ShowS # show :: HistoryAccessType -> String # showList :: [HistoryAccessType] -> ShowS # | |
| Eq HistoryAccessType Source # | |
Defined in IHaskell.IPython.Types Methods (==) :: HistoryAccessType -> HistoryAccessType -> Bool # (/=) :: HistoryAccessType -> HistoryAccessType -> Bool # | |
data HistoryReplyElement Source #
Reply to history requests.
Constructors
| HistoryReplyElement | |
Fields | |
Instances
| Show HistoryReplyElement Source # | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> HistoryReplyElement -> ShowS # show :: HistoryReplyElement -> String # showList :: [HistoryReplyElement] -> ShowS # | |
| Eq HistoryReplyElement Source # | |
Defined in IHaskell.IPython.Types Methods (==) :: HistoryReplyElement -> HistoryReplyElement -> Bool # (/=) :: HistoryReplyElement -> HistoryReplyElement -> Bool # | |
data LanguageInfo Source #
Kernel language info, see
Constructors
| LanguageInfo | |
Fields
| |
Instances
| ToJSON LanguageInfo Source # | |
Defined in IHaskell.IPython.Types Methods toJSON :: LanguageInfo -> Value # toEncoding :: LanguageInfo -> Encoding # toJSONList :: [LanguageInfo] -> Value # toEncodingList :: [LanguageInfo] -> Encoding # | |
| Show LanguageInfo Source # | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> LanguageInfo -> ShowS # show :: LanguageInfo -> String # showList :: [LanguageInfo] -> ShowS # | |
| Eq LanguageInfo Source # | |
Defined in IHaskell.IPython.Types | |
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.
Constructors
| DisplayData MimeType Text |
Instances
| Generic DisplayData Source # | |
Defined in IHaskell.IPython.Types Associated Types type Rep DisplayData :: Type -> Type # | |
| Show DisplayData Source # | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> DisplayData -> ShowS # show :: DisplayData -> String # showList :: [DisplayData] -> ShowS # | |
| Binary DisplayData Source # | |
Defined in IHaskell.IPython.Types | |
| type Rep DisplayData Source # | |
Defined in IHaskell.IPython.Types type Rep DisplayData = D1 ('MetaData "DisplayData" "IHaskell.IPython.Types" "ipython-kernel-0.10.3.0-7rXj2chaGhf4ymDgbYiVwI" 'False) (C1 ('MetaCons "DisplayData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MimeType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |
Constructors
Instances
extractPlain :: [DisplayData] -> String Source #
displayDataToJson :: DisplayData -> (Key, Value) Source #
Convert a MIME type and value into a JSON dictionary pair.