stepcut / plugins

Dynamic linking and runtime evaluation of Haskell, and C, including dependency chasing and package resolution.
GNU Lesser General Public License v2.1
52 stars 17 forks source link

eval example broken in latest github version #10

Closed noughtmare closed 5 years ago

noughtmare commented 5 years ago

I have been able to successfully compile plugins from github, but the example of the eval function doesn't work anymore.

https://github.com/stepcut/plugins/blob/5866046ca01648780a7cafbcc74c2ab3bb35257e/src/System/Eval/Haskell.hs#L89-L90

eval "1 + 6 :: Int" [] :: IO (Maybe Int) just returns Nothing.

stepcut commented 5 years ago

I don't really know anything about how this library works. It was abandon for a while and I took it over. But I pretty much just pull pull requests and upload new versions to hackage.

noughtmare commented 5 years ago

I think I now what the problem is: ghc returns some output: "Loaded package environment from /home/jaro/plugins/.ghc.environment.x86_64-linux-8.6.5" to stderr, which makes the System.Plugins.Make.build function return that string and then the System.Plugins.Make.rawMake function thinks that there is an error, but that output from ghc is not an error.