Skip to main content

Crate ghci

Crate ghci 

Source
Expand description

A crate to manage and communicate with ghci sessions

let mut ghci = Ghci::new()?;
let out = ghci.eval("1 + 1")?;
assert_eq!(out, "2\n");

See Ghci documentation for more examples.

§Platform support

This crate uses Unix-specific APIs (nix::poll, file descriptors) and only supports Unix platforms (Linux, macOS, BSDs).

Re-exports§

pub use haskell::FromHaskell;
pub use haskell::HaskellParseError;
pub use haskell::ToHaskell;

Modules§

haskell
Traits for converting between Rust values and Haskell expressions.

Structs§

EvalOutput
Result for a ghci evaluation
Ghci
A ghci session handle
GhciBuilder
Builder for configuring and creating Ghci sessions
SharedGhci
A shared ghci session for use across threads (e.g. in tests)

Enums§

GhciError
Errors associated with a Ghci session

Type Aliases§

Result
A convenient alias for std::result::Result using a GhciError