Creating a Haskell REPL within a Haskell application

Viewed 2187

I'm trying to embed a Haskell REPL within one of my Haskell applications. The idea would be that only a subset of the Haskell libraries would be loaded by default, plus my own set of functions, and the user would use those in order to interact with the environment.

To solve this problem, I know one way would be to create a (mini-)Haskell parser + evaluator and map my mini-Haskell parser's functions to actual Haskell functions, but I'm sure there is a better way to do this.

Is there a nice and clean way to build a REPL for Haskell using Haskell?

1 Answers
Related