Copyright | (c) 2009 Daniel Schoepe |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | Daniel Schoepe <daniel.schoepe@gmail.com> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell98 |
Evaluate haskell expressions at runtime in the running xmonad instance.
Synopsis
- evalExpression :: EvalConfig -> String -> X ()
- evalExpressionWithReturn :: EvalConfig -> String -> X String
- data EvalConfig = EvalConfig {
- handleError :: InterpreterError -> X String
- imports :: [(ModuleName, Maybe String)]
- modules :: [String]
- defaultEvalConfig :: EvalConfig
Usage
This module provides functions to evaluate haskell expressions at runtime To use it, bind a key to evalExpression, for example in combination with a prompt:
import XMonad import XMonad.Actions.Eval import XMonad.Prompt.Input .. , ((modMask,xK_t), inputPrompt defaultXPConfig "Eval" >>= flip whenJust (evalExpression defaultEvalConfig))
For detailed instructions on editing your key bindings, see XMonad.Doc.Extending.
Documentation
evalExpression :: EvalConfig -> String -> X () Source #
Evaluates a given expression, but discard the returned value. Provided for more convenient use in keybindings
evalExpressionWithReturn :: EvalConfig -> String -> X String Source #
Evaluates a given expression whose result type has to be an instance of Show
data EvalConfig Source #
Configuration structure
EvalConfig | |
|
defaultEvalConfig :: EvalConfig Source #
Defaults for evaluating expressions.