This library defines an Interpreter monad. It allows to load Haskell
modules, browse them, type-check and evaluate strings with Haskell
expressions and even coerce them into values. The library is thread-safe
and type-safe (even the coercion of expressions to values).
It is, essentially, a huge subset of the GHC API wrapped in a simpler
API.
Example
Check example.hs to see a simple but
comprehensive example (it must be run from the examples directory).
Changes
0.7.0
Support for GHC 8.2
Support use in a dynamically-linked executable
Add normalizeType, like ghci’s :kind!
Drop support for GHC 7.6
0.6.0
Support for GHC 8.0
Add displayException to InterpreterError
0.5.2
Add runInterpreter variant that takes a GHC libdir at runtime
Add missing negated extensions to the Extension type
Do not throw GHC warnings as errors
0.5.1
Expose unsafeInterpret in Language.Haskell.Interpreter.Unsafe
0.5.0
Drop support for GHC 7.4
Remove deprecated functions and modules:
glasgowExtensions
setUseLanguageExtensions
setInstalledModsAreInScopeQualified
Language.Haskell.Interpreter.GHC
Language.Haskell.Interpreter.GHC.Unsafe
Drop dependencies on ghc-mtl and extensible-exceptions
0.4.3
New maintainer and source code repo
0.4.2.3
It builds against 7.4.2 (not 7.4.1), so update the constraints.
0.4.2.2
Builds with GHC 7.10
Builds again with GHC 7.4
Drops dependency on utf8-string
0.4.2.1
Better error reporting (thanks to Corentin Dupont)
0.4.2.0
Based on exceptions-0.6
0.4.1.0
Based on exceptions-0.4
0.4.0.0
Compiles with GHC 7.8
Fixed an issue where P was available as a qualified version of
Prelude (thanks to Samuel Gélineau)
Uses exceptions package instead of MonadCatchIO-mtl (API breakage
expected)
No longer depends on haskell-src
Changelog should now appear in Hackage
Integrated unit tests with cabal
0.3.3.7
Fixed a race condition that would happen, for instance, when two
process where run one next to the other, making them, on some
platforms, to get the same random number seed (thanks to Mario
Pastorelli and Samuel Gélineau)
Small fix in documentation (thanks to Daniil Frumin)
0.3.3.6
Works again on GHC 7.2.x (thanks to Björn Peemöller)
0.3.3.5
Works on GHC 7.4.6
Cleans up files for phantom modules that were left behind (thanks to
Beltram Felgenhauer)
0.3.3.4
Works on GHC 7.4.1
0.3.3.3
Works on GHC 7.2.1
0.3.3.2
Supports GHC 7
0.3.3.1
Instance declaration for Applicative (InterpreterT m) works with mtl-2
(requires Applicative m, this shouldn’t break anything…)
0.3.3.0
Add unsafeRunInterpreterWithArgs
Check that only one instance of the interpreter is run at any time
0.3.2.3
Can be built against MonadCatchIO-mtl-0.3.x.x
0.3.2.2
Fixed a bug that would make expressions using heavy use of the layout
rule to fail to be interpreted (see parens)
0.3.2.1
hint.cabal includes version bounds for package ghc-mtl. This is to
avoid the accidental selection of the completely unrelated ghc-mtl
internal to GHC and, apparently, installed in the hackage server
0.3.2.0
Exports functions parens and isInterpretedModule
Experimental support for module annotations
Uses extensible-exceptions in order to provide a uniform interface
accross different ghc versions
Provides an Applicative instance for IntepreterT
Adds an option to configurate the searchPath
0.3.1.0
No longer uses Language.Haskell.Extension due to configuration
problems with Cabal. Instead, it uses its own
Language.Haskell.Interpreter.Extension module.