nix-eval-0.1.0.0: Evaluate Haskell expressions using Nix to get packages

Safe HaskellSafe
LanguageHaskell2010

Language.Eval.Internal

Synopsis

Documentation

newtype Pkg Source

Constructors

Pkg String 

newtype Mod Source

Constructors

Mod String 

newtype Expr Source

Constructors

Expr ([Pkg], [Mod], String) 

eval :: Expr -> IO (Maybe String) Source

Evaluate an Expr; this is where the magic happens! If successful, returns Just a String, which you can do what you like with.

raw :: String -> Expr Source

A raw String of Haskell code, with no packages or modules. You can use OverloadedStrings to call this automatically.

($$) :: Expr -> Expr -> Expr Source

Apply the first Expr to the second, eg. `f $$ x` ==> `f x`

asString :: Show a => a -> Expr Source

Convert the argument to a String, then send to raw