Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
simple IPython kernels. In particular, it provides a record type that defines configurations and a function that interprets a configuration as an action in some monad that can do IO.
The configuration consists primarily of functions that implement the various features of a kernel, such as running code, looking up documentation, and performing completion. An example for a simple language that nevertheless has side effects, global state, and timing effects is included in the examples directory.
Kernel Specs
To run your kernel, you will need to install the kernelspec into the Jupyter namespace. If your
kernel name is kernel
, you will need to run the command:
kernel install
This will inform Jupyter of the kernel so that it may be used.
Further profile improvements Consult the IPython documentation along with the generated
profile source code for further configuration of the frontend, including syntax highlighting, logos, help text, and so forth.
Synopsis
- easyKernel :: MonadIO m => FilePath -> KernelConfig m output result -> m ()
- installKernelspec :: MonadIO m => KernelConfig m output result -> Bool -> Maybe FilePath -> m ()
- data KernelConfig m output result = KernelConfig {
- kernelLanguageInfo :: LanguageInfo
- writeKernelspec :: FilePath -> IO KernelSpec
- displayOutput :: output -> [DisplayData]
- displayResult :: result -> [DisplayData]
- completion :: Text -> Int -> m (Text, [Text])
- inspectInfo :: Text -> Int -> m (Maybe [DisplayData])
- run :: Text -> IO () -> (output -> IO ()) -> m (result, ExecuteReplyStatus, String)
- debug :: Bool
- kernelBanner :: String
- kernelProtocolVersion :: String
- kernelImplName :: String
- kernelImplVersion :: String
Documentation
:: MonadIO m | |
=> FilePath | The connection file provided by the IPython frontend |
-> KernelConfig m output result | The kernel configuration specifying how to react to messages |
-> m () |
Execute an IPython kernel for a config. Your main
action should call this as the last thing
it does.
:: MonadIO m | |
=> KernelConfig m output result | Kernel configuration to install |
-> Bool | Whether to use Jupyter `--replace` |
-> Maybe FilePath | (Optional) prefix to install into for Jupyter `--prefix` |
-> m () |
data KernelConfig m output result Source #
The kernel configuration specifies the behavior that is specific to your language. The type parameters provide the monad in which your kernel will run, the type of intermediate outputs from running cells, and the type of final results of cells, respectively.
KernelConfig | |
|