| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
IHaskell.Eval.Evaluate
Description
This module exports all functions used for evaluation of IHaskell input.
Synopsis
- interpret :: String -> Bool -> (Bool -> Interpreter a) -> IO a
- testInterpret :: Interpreter a -> IO a
- testEvaluate :: String -> IO ()
- evaluate :: KernelState -> String -> Publisher -> (KernelState -> [WidgetMsg] -> IO KernelState) -> Interpreter KernelState
- flushWidgetMessages :: KernelState -> [WidgetMsg] -> (KernelState -> [WidgetMsg] -> IO KernelState) -> Interpreter KernelState
- type Interpreter = Ghc
- liftIO :: MonadIO m => IO a -> m a
- typeCleaner :: String -> String
- formatType :: String -> Display
- capturedIO :: Publisher -> KernelState -> IO a -> Interpreter Display
Documentation
interpret :: String -> Bool -> (Bool -> Interpreter a) -> IO a #
Run an interpreting action. This is effectively runGhc with initialization and importing. First
argument indicates whether stdin is handled specially, which cannot be done in a testing
environment. The argument passed to the action indicates whether Haskell support libraries are
available.
testInterpret :: Interpreter a -> IO a #
Interpreting function for testing.
testEvaluate :: String -> IO () #
Evaluation function for testing.
Arguments
| :: KernelState | The kernel state. |
| -> String | Haskell code or other interpreter commands. |
| -> Publisher | Function used to publish data outputs. |
| -> (KernelState -> [WidgetMsg] -> IO KernelState) | Function to handle widget messages |
| -> Interpreter KernelState |
Evaluate some IPython input code.
flushWidgetMessages :: KernelState -> [WidgetMsg] -> (KernelState -> [WidgetMsg] -> IO KernelState) -> Interpreter KernelState #
type Interpreter = Ghc #
typeCleaner :: String -> String #
formatType :: String -> Display #
capturedIO :: Publisher -> KernelState -> IO a -> Interpreter Display #