fbsamples / ghc-hotswap Goto Github PK
View Code? Open in Web Editor NEWExample code for how we swap compiled code within a running Haskell process.
License: Other
Example code for how we swap compiled code within a running Haskell process.
License: Other
When I try to reload shared object by same path as an old one, I got error:
$ cabal run /tmp/1.so
...normal app output...
Next SO to use: /tmp/1.so
ghc-hotswap-demo: ^^ Could not load 'hs_soHandles', dependency unresolved. See top entry above.
I think that the reason is unloading old object after loading a new object. I've made a PR #2 for fix this issue. It works but I don't know maybe it may broke some internal logic or so. I'm not a real haskeller.:)
This sample works great when using Linux. On windows, however, the sample either produces the wrong output or crashes with an access violation. The much longer compile times aside, is Windows principally not supported in this case?
There are some simple examples that work, like providing values of type Int, Int -> Int, Maybe Int, String -> IO String. Just String or Text immediately gives access violations.
I can't seem to pass a flag to cabal or find an equivalent to "enable-library-for-ghci" in the stack options. I'm getting a "not a relocatable object (.o) file" error.
Was wondering if you know a way around this?
Is there a reason the core hotswap stuff here hasn't had a hackage release? I get it's semi-demo code, but it seems to be the only open-source code around to do stuff these days, and it would be nice if the GHC.Hotswap
library was directly cabal-installable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.