I have a library and I want my executable to be pretty much what I get when I cabal repl
it, i.e. I want the user to be able to use Haskell expressions, and import the modules and use the data types that are defined in my library.
Is it possible? I get the idea that hint
can only work with source files (which are not available to the user), but I'm not certain. When I tried to load modules from my library or from cabal packages that are globally installed, I got a vague error message saying that the module is a package module. In fact, almost whatever I write will do that too:
ghci> runInterpreter $ loadModules ["Not.A.Package.Module"]
Left (WontCompile [GhcError {errMsg = "<no location info>: error:\n module \8216Not.A.Package.Module\8217 is a package module"}])
Is there any way to do this? (P.S. I'm using GHC 8.0.1 and plugins
isn't supporting it, and I also got the idea it's a very dead project. If there's another way but hint
& plugins
I'm open to it).