| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
IHaskell.Types
Description
- 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 {
- header :: MessageHeader
- pagerOutput :: [DisplayData]
- traceback :: [Text]
- ename :: Text
- evalue :: Text
- | PublishStatus { }
- | PublishStream { }
- | PublishDisplayData {
- header :: MessageHeader
- source :: String
- displayData :: [DisplayData]
- | 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 {}
- data MessageType :: *
- = KernelInfoReplyMessage
- | KernelInfoRequestMessage
- | ExecuteInputMessage
- | ExecuteReplyMessage
- | ExecuteErrorMessage
- | ExecuteRequestMessage
- | ExecuteResultMessage
- | StatusMessage
- | StreamMessage
- | DisplayDataMessage
- | OutputMessage
- | InputMessage
- | IsCompleteRequestMessage
- | IsCompleteReplyMessage
- | CompleteRequestMessage
- | CompleteReplyMessage
- | InspectRequestMessage
- | InspectReplyMessage
- | ShutdownRequestMessage
- | ShutdownReplyMessage
- | ClearOutputMessage
- | InputRequestMessage
- | InputReplyMessage
- | CommOpenMessage
- | CommDataMessage
- | CommInfoRequestMessage
- | CommInfoReplyMessage
- | CommCloseMessage
- | HistoryRequestMessage
- | HistoryReplyMessage
- dupHeader :: MessageHeader -> MessageType -> IO MessageHeader
- type Username = Text
- type Metadata = Map Text Text
- replyType :: MessageType -> Maybe MessageType
- data ExecutionState :: *
- data StreamType :: *
- data MimeType :: *
- data DisplayData :: * = DisplayData MimeType Text
- data EvaluationResult
- = IntermediateResult { }
- | FinalResult { }
- data ExecuteReplyStatus :: *
- data KernelState = KernelState {}
- data LintStatus
- type Width = Int
- type Height = Int
- data Display
- = Display [DisplayData]
- | ManyDisplay [Display]
- defaultKernelState :: KernelState
- extractPlain :: [DisplayData] -> String
- kernelOpts :: [KernelOpt]
- data KernelOpt = KernelOpt {
- getOptionName :: [String]
- getSetName :: [String]
- getUpdateKernelState :: KernelState -> KernelState
- class IHaskellDisplay a where
- class IHaskellDisplay a => IHaskellWidget a where
- data Widget = IHaskellWidget a => Widget a
- data WidgetMsg
- data WidgetMethod
- data KernelSpec :: * = KernelSpec {}
Documentation
A message used to communicate with the IPython frontend.
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 |
Fields
| |
| PublishStatus | |
Fields
| |
| PublishStream | |
Fields
| |
| PublishDisplayData | |
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 :: * #
A message header with some metadata.
Constructors
| MessageHeader | |
Fields
| |
Instances
data MessageType :: * #
The type of a message, corresponding to IPython message types.
Constructors
Instances
dupHeader :: MessageHeader -> MessageType -> IO MessageHeader #
Duplicate a message header, giving it a new UUID and message type.
replyType :: MessageType -> Maybe MessageType #
Get the reply message type for a request message type.
data DisplayData :: * #
Data for display: a string with associated MIME type.
Constructors
| DisplayData MimeType Text |
Instances
data EvaluationResult #
Output of evaluation.
Constructors
| IntermediateResult | An intermediate result which communicates what has been printed thus far. |
| FinalResult | |
Instances
data KernelState #
All state stored in the kernel between executions.
Constructors
| KernelState | |
Fields
| |
Instances
Wrapper for ipython-kernel's DisplayData which allows sending multiple results from the same expression.
Constructors
| Display [DisplayData] | |
| ManyDisplay [Display] |
extractPlain :: [DisplayData] -> String #
kernelOpts :: [KernelOpt] #
Kernel options to be set via `:set` and `:option`.
Constructors
| KernelOpt | |
Fields
| |
class IHaskellDisplay a where #
A class for displayable Haskell types.
IHaskell's displaying of results behaves as if these two overlapping/undecidable instances also existed:
instance (Show a) => IHaskellDisplay a instance Show a where shows _ = id
Minimal complete definition
Instances
class IHaskellDisplay a => IHaskellWidget a where #
Display as an interactive widget.
Minimal complete definition
Methods
targetName :: a -> String #
Target name for this widget. The actual input parameter should be ignored. By default evaluate to "jupyter.widget", which is used by IPython for its backbone widgets.
targetModule :: a -> String #
Target module for this widget. Evaluates to an empty string by default.
getCommUUID :: a -> UUID #
Get the uuid for comm associated with this widget. The widget is responsible for storing the UUID during initialization.
Arguments
| :: a | Widget to open a comm port with. |
| -> (Value -> IO ()) | A function for sending messages. |
| -> IO () |
Called when the comm is opened. Allows additional messages to be sent after comm open.
Arguments
| :: a | Widget which is being communicated with. |
| -> Value | Data recieved from the frontend. |
| -> (Value -> IO ()) | Way to respond to the message. |
| -> IO () |
Respond to a comm data message. Called when a message is recieved on the comm associated with the widget.
Called when a comm_close is recieved from the frontend.
Instances
Constructors
| IHaskellWidget a => Widget a |
Send JSON objects with specific formats
Constructors
| Open Widget Value | Cause the interpreter to open a new comm, and register the associated widget in the kernelState. Also sends an initial state Value with comm_open. |
| Update Widget Value | Cause the interpreter to send a comm_msg containing a state update for the widget. Can be used to send fragments of state for update. Also updates the value of widget stored in the kernelState |
| View Widget | Cause the interpreter to send a comm_msg containing a display command for the frontend. |
| Close Widget Value | Cause the interpreter to close the comm associated with the widget. Also sends data with comm_close. |
| Custom Widget Value | A [method .= custom, content = value] message |
| JSONValue Widget Value | A json object that is sent to the widget without modifications. |
| DispMsg Widget Display | A |
| ClrOutput Widget Bool | A |
data KernelSpec :: * #
Constructors
| KernelSpec | |
Fields
| |
Instances