| Safe Haskell | Safe-Inferred | 
|---|---|
| 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 { }
 - | 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 {}
 - 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
 
 - dupHeader :: MessageHeader -> MessageType -> IO MessageHeader
 - setVersion :: MessageHeader -> String -> MessageHeader
 - type Username = Text
 - data Metadata
 - type BufferPath = [Text]
 - replyType :: MessageType -> Maybe MessageType
 - data ExecutionState
 - data StreamType
 - data MimeType
 - data DisplayData = DisplayData MimeType Text
 - data ErrorOccurred
 - data EvaluationResult
- = IntermediateResult !Display
 - | FinalResult !Display ![DisplayData] ![WidgetMsg]
 
 - evaluationOutputs :: EvaluationResult -> Display
 - 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
- targetName :: a -> String
 - targetModule :: a -> String
 - getBufferPaths :: a -> [BufferPath]
 - getCommUUID :: a -> UUID
 - open :: a -> (Value -> IO ()) -> IO ()
 - comm :: a -> Value -> (Value -> IO ()) -> IO ()
 - close :: a -> Value -> IO ()
 
 - data Widget = forall a.IHaskellWidget a => Widget a
 - data WidgetMsg
 - data WidgetMethod
 - data KernelSpec = KernelSpec {}
 
Documentation
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 #
A message header with some metadata.
Constructors
| MessageHeader | |
Fields 
  | |
Instances
| ToJSON MessageHeader | |
Defined in IHaskell.IPython.Types Methods toJSON :: MessageHeader -> Value # toEncoding :: MessageHeader -> Encoding # toJSONList :: [MessageHeader] -> Value # toEncodingList :: [MessageHeader] -> Encoding # omitField :: MessageHeader -> Bool #  | |
| 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 #  | |
data MessageType #
The type of a message, corresponding to IPython message types.
Constructors
Instances
| FromJSON 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 #  | |
| Eq MessageType | |
Defined in IHaskell.IPython.Types  | |
dupHeader :: MessageHeader -> MessageType -> IO MessageHeader Source #
Duplicate a message header, giving it a new UUID and message type.
Arguments
| :: MessageHeader | The header to modify  | 
| -> String | The version to set  | 
| -> MessageHeader | The modified header  | 
Modifies a header and appends the version of the Widget Messaging Protocol as metadata
A metadata dictionary.
type BufferPath = [Text] Source #
replyType :: MessageType -> Maybe MessageType #
Get the reply message type for a request message type.
data ExecutionState #
The execution state of the kernel.
Instances
| FromJSON ExecutionState | |
Defined in IHaskell.IPython.Types Methods parseJSON :: Value -> Parser ExecutionState # parseJSONList :: Value -> Parser [ExecutionState] #  | |
| ToJSON ExecutionState | 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 # omitField :: ExecutionState -> Bool #  | |
| Show ExecutionState | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> ExecutionState -> ShowS # show :: ExecutionState -> String # showList :: [ExecutionState] -> ShowS #  | |
data StreamType #
Input and output streams.
Instances
| FromJSON StreamType | |
Defined in IHaskell.IPython.Types  | |
| ToJSON StreamType | 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 # omitField :: StreamType -> Bool #  | |
| Show StreamType | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> StreamType -> ShowS # show :: StreamType -> String # showList :: [StreamType] -> ShowS #  | |
Constructors
Instances
data DisplayData #
Data for display: a string with associated MIME type.
Constructors
| DisplayData MimeType Text | 
Instances
| Generic DisplayData | |
Defined in IHaskell.IPython.Types Associated Types type Rep DisplayData :: Type -> Type #  | |
| Show DisplayData | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> DisplayData -> ShowS # show :: DisplayData -> String # showList :: [DisplayData] -> ShowS #  | |
| Binary DisplayData | |
Defined in IHaskell.IPython.Types  | |
| Eq DisplayData | |
Defined in IHaskell.IPython.Types  | |
| IHaskellDisplay DisplayData Source # | |
Defined in IHaskell.Types  | |
| type Rep DisplayData | |
Defined in IHaskell.IPython.Types type Rep DisplayData = D1 ('MetaData "DisplayData" "IHaskell.IPython.Types" "ipython-kernel-0.11.0.0-MjTY5lVAlqEk13kqCECHS" '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 ErrorOccurred Source #
Whether or not an error occurred.
Instances
| Show ErrorOccurred Source # | |
Defined in IHaskell.Types Methods showsPrec :: Int -> ErrorOccurred -> ShowS # show :: ErrorOccurred -> String # showList :: [ErrorOccurred] -> ShowS #  | |
| Eq ErrorOccurred Source # | |
Defined in IHaskell.Types Methods (==) :: ErrorOccurred -> ErrorOccurred -> Bool # (/=) :: ErrorOccurred -> ErrorOccurred -> Bool #  | |
data EvaluationResult Source #
Output of evaluation.
A result can either be intermediate or final.
 Final result has Mimebundles (DisplayData) and Comm operations
 (WidgetMsg) on top of Display outputs.
Constructors
| IntermediateResult !Display | An intermediate result which communicates what has been printed thus far.  | 
| FinalResult !Display ![DisplayData] ![WidgetMsg] | 
Instances
| Show EvaluationResult Source # | |
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
| FromJSON ExecuteReplyStatus | |
Defined in IHaskell.IPython.Types Methods parseJSON :: Value -> Parser ExecuteReplyStatus # parseJSONList :: Value -> Parser [ExecuteReplyStatus] #  | |
| Show ExecuteReplyStatus | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> ExecuteReplyStatus -> ShowS # show :: ExecuteReplyStatus -> String # showList :: [ExecuteReplyStatus] -> ShowS #  | |
data KernelState Source #
All state stored in the kernel between executions.
Constructors
| KernelState | |
Fields 
  | |
Instances
| Show KernelState Source # | |
Defined in IHaskell.Types Methods showsPrec :: Int -> KernelState -> ShowS # show :: KernelState -> String # showList :: [KernelState] -> ShowS #  | |
data LintStatus Source #
Current HLint status.
Instances
| Show LintStatus Source # | |
Defined in IHaskell.Types Methods showsPrec :: Int -> LintStatus -> ShowS # show :: LintStatus -> String # showList :: [LintStatus] -> ShowS #  | |
| Eq LintStatus Source # | |
Defined in IHaskell.Types  | |
Wrapper for ipython-kernel's DisplayData which allows sending multiple results from the same expression.
Constructors
| Display [DisplayData] | |
| ManyDisplay [Display] | 
Instances
| ToJSON Display Source # | |
| Monoid Display Source # | |
| Semigroup Display Source # | |
| Generic Display Source # | |
| Show Display Source # | |
| Binary Display Source # | |
| Eq Display Source # | |
| IHaskellDisplay Display Source # | |
| type Rep Display Source # | |
Defined in IHaskell.Types type Rep Display = D1 ('MetaData "Display" "IHaskell.Types" "ihaskell-0.12.0.0-89wfJHJNb892vFc2lE81s3" '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] Source #
Kernel options to be set via `:set` and `:option`.
Constructors
| KernelOpt | |
Fields 
  | |
class IHaskellDisplay a where Source #
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
Instances
| IHaskellDisplay Display Source # | |
| IHaskellDisplay Widget Source # | |
| IHaskellDisplay DisplayData Source # | |
Defined in IHaskell.Types  | |
| IHaskellDisplay a => IHaskellDisplay (IO a) Source # | 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.  | 
| IHaskellDisplay a => IHaskellDisplay [a] Source # | |
class IHaskellDisplay a => IHaskellWidget a where Source #
Display as an interactive widget.
Minimal complete definition
Methods
targetName :: a -> String Source #
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 Source #
Target module for this widget. Evaluates to an empty string by default.
getBufferPaths :: a -> [BufferPath] Source #
Buffer paths for this widget. Evaluates to an empty array by default.
getCommUUID :: a -> UUID Source #
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
| IHaskellWidget Widget Source # | |
Defined in IHaskell.Types  | |
Constructors
| forall a.IHaskellWidget a => Widget a | 
Instances
| Show Widget Source # | |
| Eq Widget Source # | |
| IHaskellDisplay Widget Source # | |
| IHaskellWidget Widget Source # | |
Defined in IHaskell.Types  | |
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 Bool | A   | 
data WidgetMethod Source #
Constructors
| UpdateState Value [BufferPath] | |
| CustomContent Value | |
| DisplayWidget | 
Instances
| ToJSON WidgetMethod Source # | |
Defined in IHaskell.Types Methods toJSON :: WidgetMethod -> Value # toEncoding :: WidgetMethod -> Encoding # toJSONList :: [WidgetMethod] -> Value # toEncodingList :: [WidgetMethod] -> Encoding # omitField :: WidgetMethod -> Bool #  | |
data KernelSpec #
Constructors
| KernelSpec | |
Fields 
  | |
Instances
| ToJSON KernelSpec | |
Defined in IHaskell.IPython.Types Methods toJSON :: KernelSpec -> Value # toEncoding :: KernelSpec -> Encoding # toJSONList :: [KernelSpec] -> Value # toEncodingList :: [KernelSpec] -> Encoding # omitField :: KernelSpec -> Bool #  | |
| Show KernelSpec | |
Defined in IHaskell.IPython.Types Methods showsPrec :: Int -> KernelSpec -> ShowS # show :: KernelSpec -> String # showList :: [KernelSpec] -> ShowS #  | |
| Eq KernelSpec | |
Defined in IHaskell.IPython.Types  | |