| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
IHaskell.Types
Description
Synopsis
- 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
| Read MessageHeader | |
Defined in IHaskell.IPython.Types Methods readsPrec :: Int -> ReadS MessageHeader # readList :: ReadS [MessageHeader] # | |
| Show MessageHeader | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> MessageHeader -> ShowS # show :: MessageHeader -> String # showList :: [MessageHeader] -> ShowS # | |
| ToJSON MessageHeader | |
Defined in IHaskell.IPython.Types Methods toJSON :: MessageHeader -> Value # toEncoding :: MessageHeader -> Encoding # toJSONList :: [MessageHeader] -> Value # toEncodingList :: [MessageHeader] -> Encoding # | |
data MessageType #
The type of a message, corresponding to IPython message types.
Constructors
Instances
| Eq MessageType | |
Defined in IHaskell.IPython.Types | |
| Read MessageType | |
Defined in IHaskell.IPython.Types Methods readsPrec :: Int -> ReadS MessageType # readList :: ReadS [MessageType] # readPrec :: ReadPrec MessageType # readListPrec :: ReadPrec [MessageType] # | |
| Show MessageType | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # | |
| FromJSON MessageType | |
Defined in IHaskell.IPython.Types | |
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 ExecutionState #
The execution state of the kernel.
Instances
| Show ExecutionState | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> ExecutionState -> ShowS # show :: ExecutionState -> String # showList :: [ExecutionState] -> ShowS # | |
| FromJSON ExecutionState | |
Defined in IHaskell.IPython.Types Methods parseJSON :: Value -> Parser ExecutionState # parseJSONList :: Value -> Parser [ExecutionState] # | |
data StreamType #
Input and output streams.
Instances
| Show StreamType | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> StreamType -> ShowS # show :: StreamType -> String # showList :: [StreamType] -> ShowS # | |
| FromJSON StreamType | |
Defined in IHaskell.IPython.Types | |
Constructors
| PlainText | |
| MimeHtml | |
| MimePng Width Height | |
| MimeJpg Width Height | |
| MimeSvg | |
| MimeLatex | |
| MimeJavascript |
Instances
data DisplayData #
Data for display: a string with associated MIME type.
Constructors
| DisplayData MimeType Text |
Instances
| Show DisplayData | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> DisplayData -> ShowS # show :: DisplayData -> String # showList :: [DisplayData] -> ShowS # | |
| Generic DisplayData | |
Defined in IHaskell.IPython.Types Associated Types type Rep DisplayData :: * -> * # | |
| Serialize DisplayData | |
Defined in IHaskell.IPython.Types | |
| IHaskellDisplay DisplayData # | |
Defined in IHaskell.Display Methods display :: DisplayData -> IO Display # | |
| type Rep DisplayData | |
Defined in IHaskell.IPython.Types type Rep DisplayData = D1 (MetaData "DisplayData" "IHaskell.IPython.Types" "ipython-kernel-0.9.0.2-JaeIZ9msj9jGFqD0IxNCb" 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))) | |
data EvaluationResult #
Output of evaluation.
Constructors
| IntermediateResult | An intermediate result which communicates what has been printed thus far. |
| FinalResult | |
Instances
| Show EvaluationResult # | |
Defined in IHaskell.Types Methods showsPrec :: Int -> EvaluationResult -> ShowS # show :: EvaluationResult -> String # showList :: [EvaluationResult] -> ShowS # | |
data ExecuteReplyStatus #
Possible statuses in the execution reply messages.
Instances
| Show ExecuteReplyStatus | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> ExecuteReplyStatus -> ShowS # show :: ExecuteReplyStatus -> String # showList :: [ExecuteReplyStatus] -> ShowS # | |
| FromJSON ExecuteReplyStatus | |
Defined in IHaskell.IPython.Types Methods parseJSON :: Value -> Parser ExecuteReplyStatus # parseJSONList :: Value -> Parser [ExecuteReplyStatus] # | |
data KernelState #
All state stored in the kernel between executions.
Constructors
| KernelState | |
Fields
| |
Instances
| Show KernelState # | |
Defined in IHaskell.Types Methods showsPrec :: Int -> KernelState -> ShowS # show :: KernelState -> String # showList :: [KernelState] -> ShowS # | |
data LintStatus #
Current HLint status.
Instances
| Eq LintStatus # | |
Defined in IHaskell.Types | |
| Show LintStatus # | |
Defined in IHaskell.Types Methods showsPrec :: Int -> LintStatus -> ShowS # show :: LintStatus -> String # showList :: [LintStatus] -> ShowS # | |
Wrapper for ipython-kernel's DisplayData which allows sending multiple results from the same expression.
Constructors
| Display [DisplayData] | |
| ManyDisplay [Display] |
Instances
| Show Display # | |
| Generic Display # | |
| Semigroup Display # | |
| Monoid Display # | |
| Serialize Display # | |
| IHaskellDisplay Display # | |
| type Rep Display # | |
Defined in IHaskell.Types type Rep Display = D1 (MetaData "Display" "IHaskell.Types" "ihaskell-0.9.0.3-kG6bDbQGIcK8UUxx08sXn" False) (C1 (MetaCons "Display" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [DisplayData])) :+: C1 (MetaCons "ManyDisplay" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [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
| IHaskellDisplay DisplayData # | |
Defined in IHaskell.Display Methods display :: DisplayData -> IO Display # | |
| IHaskellDisplay Display # | |
| IHaskellDisplay Widget # | |
| IHaskellDisplay a => IHaskellDisplay [a] # | |
Defined in IHaskell.Display | |
| IHaskellDisplay a => IHaskellDisplay (IO a) # | these instances cause the image, html etc. which look like: Display [Display] IO [Display] IO (IO Display) be run the IO and get rendered (if the frontend allows it) in the pretty form. |
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.
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 WidgetMethod #
Constructors
| UpdateState Value | |
| CustomContent Value | |
| DisplayWidget |
Instances
| ToJSON WidgetMethod # | |
Defined in IHaskell.Types Methods toJSON :: WidgetMethod -> Value # toEncoding :: WidgetMethod -> Encoding # toJSONList :: [WidgetMethod] -> Value # toEncodingList :: [WidgetMethod] -> Encoding # | |
data KernelSpec #
Constructors
| KernelSpec | |
Fields
| |
Instances
| Eq KernelSpec | |
Defined in IHaskell.IPython.Types | |
| Show KernelSpec | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> KernelSpec -> ShowS # show :: KernelSpec -> String # showList :: [KernelSpec] -> ShowS # | |
| ToJSON KernelSpec | |
Defined in IHaskell.IPython.Types Methods toJSON :: KernelSpec -> Value # toEncoding :: KernelSpec -> Encoding # toJSONList :: [KernelSpec] -> Value # toEncodingList :: [KernelSpec] -> Encoding # | |