ipython-kernel-0.9.1.0: A library for creating kernels for IPython frontends

Safe HaskellNone
LanguageHaskell2010

IHaskell.IPython.Types

Contents

Description

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

Synopsis

IPython kernel profile

data Profile #

A kernel profile, specifying how the kernel communicates.

Constructors

Profile 

Fields

data Transport #

The transport mechanism used to communicate with the IPython frontend.

Constructors

TCP

Default transport mechanism via TCP.

type Port = Int #

A TCP port.

type IP = String #

An IP address.

IPython kernelspecs

data KernelSpec #

Constructors

KernelSpec 

Fields

  • kernelDisplayName :: String

    Name shown to users to describe this kernel (e.g. Haskell)

  • kernelLanguage :: String

    Name for the kernel; unique kernel identifier (e.g. "haskell")

  • kernelCommand :: [String]

    Command to run to start the kernel. One of the strings maybe "{connection_file}", which will be replaced by the path to a kernel profile file (see Profile) when the command is run.

IPython messaging protocol

data Message #

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

CommInfoRequest

A request from a frontend for information about the comms.

CommInfoReply

A response to a CommInfoRequest.

Fields

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 
InspectRequest 

Fields

InspectReply 

Fields

ShutdownRequest 

Fields

ShutdownReply 

Fields

ClearOutput 

Fields

RequestInput 
InputReply 
CommOpen 
CommData 
CommClose 
HistoryRequest 

Fields

HistoryReply 
SendNothing 
Instances
Show Message # 
Instance details

Defined in IHaskell.IPython.Types

ToJSON Message # 
Instance details

Defined in IHaskell.IPython.Message.Writer

data MessageHeader #

A message header with some metadata.

Constructors

MessageHeader 

Fields

type Username = Text #

A username for the source of a message.

type Metadata = Map Text Text #

A metadata dictionary.

data CodeReview #

Constructors

CodeComplete 
CodeIncomplete String

String to be used to indent next line of input

CodeInvalid 
CodeUnknown 
Instances
Show CodeReview # 
Instance details

Defined in IHaskell.IPython.Types

type Width = Int #

Possible MIME types for the display data.

type Height = Int #

data StreamType #

Input and output streams.

Constructors

Stdin 
Stdout 
Stderr 
Instances
Show StreamType # 
Instance details

Defined in IHaskell.IPython.Types

ToJSON StreamType #

Print a stream as "stdin" or "stdout" strings.

Instance details

Defined in IHaskell.IPython.Message.Writer

FromJSON StreamType # 
Instance details

Defined in IHaskell.IPython.Types

data ExecutionState #

The execution state of the kernel.

Constructors

Busy 
Idle 
Starting 

data ExecuteReplyStatus #

Possible statuses in the execution reply messages.

Constructors

Ok 
Err 
Abort 

data HistoryAccessType #

Ways in which the frontend can request history. TODO: Implement fields as described in messaging spec.

replyType :: MessageType -> Maybe MessageType #

Get the reply message type for a request message type.

IPython display data message

data DisplayData #

Data for display: a string with associated MIME type.

Constructors

DisplayData MimeType Text 
Instances
Show DisplayData # 
Instance details

Defined in IHaskell.IPython.Types

Generic DisplayData # 
Instance details

Defined in IHaskell.IPython.Types

Associated Types

type Rep DisplayData :: Type -> Type #

Serialize DisplayData # 
Instance details

Defined in IHaskell.IPython.Types

type Rep DisplayData # 
Instance details

Defined in IHaskell.IPython.Types

type Rep DisplayData = D1 (MetaData "DisplayData" "IHaskell.IPython.Types" "ipython-kernel-0.9.1.0-CvVMuhJ67lr7yTmLd8WFuG" 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 MimeType #

Instances
Eq MimeType # 
Instance details

Defined in IHaskell.IPython.Types

Read MimeType # 
Instance details

Defined in IHaskell.IPython.Types

Show MimeType # 
Instance details

Defined in IHaskell.IPython.Types

Generic MimeType # 
Instance details

Defined in IHaskell.IPython.Types

Associated Types

type Rep MimeType :: Type -> Type #

Methods

from :: MimeType -> Rep MimeType x #

to :: Rep MimeType x -> MimeType #

Serialize MimeType # 
Instance details

Defined in IHaskell.IPython.Types

type Rep MimeType # 
Instance details

Defined in IHaskell.IPython.Types

type Rep MimeType = D1 (MetaData "MimeType" "IHaskell.IPython.Types" "ipython-kernel-0.9.1.0-CvVMuhJ67lr7yTmLd8WFuG" False) (((C1 (MetaCons "PlainText" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "MimeHtml" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MimeBmp" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Width) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Height)))) :+: ((C1 (MetaCons "MimePng" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Width) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Height)) :+: C1 (MetaCons "MimeJpg" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Width) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Height))) :+: (C1 (MetaCons "MimeGif" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Width) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Height)) :+: C1 (MetaCons "MimeSvg" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "MimeLatex" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "MimeMarkdown" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MimeJavascript" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "MimeJson" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MimeVega" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "MimeVegalite" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MimeVdom" PrefixI False) (U1 :: Type -> Type)))))

Orphan instances

Serialize Text # 
Instance details

Methods

put :: Putter Text #

get :: Get Text #