ihaskell-0.4.3.0: A Haskell backend kernel for the IPython project.

Safe HaskellNone

IHaskell.IPython.Types

Contents

Description

This module contains all types used to create an IPython language kernel.

Synopsis

IPython kernel profile

data Profile Source

A kernel profile, specifying how the kernel communicates.

Constructors

Profile 

Fields

ip :: IP

The IP on which to listen.

transport :: Transport

The transport mechanism.

stdinPort :: Port

The stdin channel port.

controlPort :: Port

The control channel port.

hbPort :: Port

The heartbeat channel port.

shellPort :: Port

The shell command port.

iopubPort :: Port

The IOPub port.

key :: Text

The HMAC encryption key.

data Transport Source

The transport mechanism used to communicate with the IPython frontend.

Constructors

TCP

Default transport mechanism via TCP.

type Port = IntSource

A TCP port.

type IP = StringSource

An IP address.

IPython messaging protocol

data Message Source

A message used to communicate with the IPython frontend.

Constructors

KernelInfoRequest

A request from a frontend for information about the kernel.

KernelInfoReply

A response to a KernelInfoRequest.

Fields

header :: MessageHeader
 
versionList :: [Int]

The version of the language, e.g. [7, 6, 3] for GHC 7.6.3

language :: String

The language name, e.g. haskell

ExecuteRequest

A request from a frontend to execute some code.

Fields

header :: MessageHeader
 
getCode :: Text

The entire block of text where the line is. This may be useful in the case of multiline completions where more context may be needed. Note: if in practice this field proves unnecessary, remove it to lighten the messages. json field block

The code string.

getSilent :: Bool

Whether this should be silently executed.

getStoreHistory :: Bool

Whether to store this in history.

getAllowStdin :: Bool

Whether this code can use stdin.

getUserVariables :: [Text]

Unused.

getUserExpressions :: [Text]

Unused.

ExecuteReply

A reply to an execute request.

Fields

header :: MessageHeader
 
status :: ExecuteReplyStatus

The status of the output.

pagerOutput :: String

The help string to show in the pager.

executionCounter :: Int

The execution count, i.e. which output this is.

PublishStatus 

Fields

header :: MessageHeader
 
executionState :: ExecutionState

The execution state of the kernel.

PublishStream 

Fields

header :: MessageHeader
 
streamType :: StreamType

Which stream to publish to.

streamContent :: String

What to publish.

PublishDisplayData 

Fields

header :: MessageHeader
 
source :: String

The name of the data source.

displayData :: [DisplayData]

A list of data representations.

PublishOutput 

Fields

header :: MessageHeader
 
reprText :: String

Printed output text.

executionCount :: Int

Which input this is.

Which output this is for.

PublishInput 

Fields

header :: MessageHeader
 
inCode :: String

Submitted input code.

executionCount :: Int

Which input this is.

Which output this is for.

CompleteRequest 

Fields

header :: MessageHeader
 
getCode :: Text

The entire block of text where the line is. This may be useful in the case of multiline completions where more context may be needed. Note: if in practice this field proves unnecessary, remove it to lighten the messages. json field block

The code string.

getCodeLine :: Text

just the line with the cursor. json field line

getCursorPos :: Int

position of the cursor (index into the line?). json field cursor_pos

CompleteReply 
ObjectInfoRequest 

Fields

header :: MessageHeader
 
objectName :: Text

Name of object which was searched for.

Name of object being searched for.

detailLevel :: Int

Level of detail desired (defaults to 0). 0 is equivalent to foo?, 1 is equivalent to foo??.

ObjectInfoReply 

Fields

header :: MessageHeader
 
objectName :: Text

Name of object which was searched for.

Name of object being searched for.

objectFound :: Bool

Whether the object was found.

objectTypeString :: Text

Object type.

objectDocString :: Text
 
ShutdownRequest 

Fields

header :: MessageHeader
 
restartPending :: Bool

Whether this shutdown precedes a restart.

Whether this shutdown precedes a restart.

ShutdownReply 

Fields

header :: MessageHeader
 
restartPending :: Bool

Whether this shutdown precedes a restart.

Whether this shutdown precedes a restart.

ClearOutput 

Fields

header :: MessageHeader
 
wait :: Bool

Whether to wait to redraw until there is more output.

RequestInput 
InputReply 
CommOpen 
CommData 
CommClose 
SendNothing 

data MessageHeader Source

A message header with some metadata.

Constructors

MessageHeader 

Fields

identifiers :: [ByteString]

The identifiers sent with the message.

parentHeader :: Maybe MessageHeader

The parent header, if present.

metadata :: Metadata

A dict of metadata.

messageId :: UUID

A unique message UUID.

sessionId :: UUID

A unique session UUID.

username :: Username

The user who sent this message.

msgType :: MessageType

The message type.

type Username = TextSource

A username for the source of a message.

type Metadata = Map Text TextSource

A metadata dictionary.

type Width = IntSource

Possible MIME types for the display data.

data StreamType Source

Input and output streams.

Constructors

Stdin 
Stdout 

Instances

Show StreamType 
ToJSON StreamType

Print a stream as stdin or stdout strings.

data ExecutionState Source

The execution state of the kernel.

Constructors

Busy 
Idle 
Starting 

Instances

Show ExecutionState 
ToJSON ExecutionState

Print an execution state as busy, idle, or starting.

data ExecuteReplyStatus Source

Possible statuses in the execution reply messages.

Constructors

Ok 
Err 
Abort 

replyType :: MessageType -> Maybe MessageTypeSource

Get the reply message type for a request message type.

IPython display data message

data DisplayData Source

Data for display: a string with associated MIME type.

Constructors

DisplayData MimeType Text