Hint - Embed a GHCi-like interpreter in your code
Take a look at example.hs
here
.
Darcs repos is
here
.