在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):lukexi/halive开源软件地址(OpenSource Url):https://github.com/lukexi/halive开源编程语言(OpenSource Language):Haskell 98.9%开源软件介绍(OpenSource Introduction):
Live recompiler for Haskell Halive uses the GHC API to instantly recompile and reload your code any time you change it. Usage:
and then
Any time you change a file in the current directory or its subdirectories,
halive will recompile and rerun the If the program is long-running (e.g. a daemon, GUI or game loop) it will be killed and restarted. Learn how to maintain state in the next section. Try a live-coding GL demo by running:
Changing values in Keeping values aliveTo keep state alive, import
to only create the resource the first time you run the program, and then reuse it on subsequent recompilations. You can see this in action in Thanks to Chris Done's
Watch custom file types for changesBy default, Halive will reload your code when files with the following extensions change: If you have any other file type that you'd like to be watched by Halive, use the
Passing command-line argumentsTo use Halive with haskell code that is expecting command-line arguments,
separate the arguments to Halive and the arguments to the app with a
Compiled CodeYou can pass This will be slower to recompile but faster to run. NotesCreating, updating, and deleting modules in the include path should work fine during a Halive session. Halive supports Stack projects and Cabal sandboxes; if run within a directory containing a stack.yaml or cabal.sandbox.config file it will use the appropriate package databases when running the target. Halive works nicely with either batch-processing or run-loop type programs — if the program finishes, it will be restarted on next save, and if it's still running, it will be killed and restarted on save. To kill Halive during run-loop type programs, you may need to hold down Ctrl-C to get GHC to recognize the double-Control-C-kill sequence. Halive works on Windows, Mac, and Linux As a LibraryHalive can also be integrated into your own project as a library in a few lines of code. See TroubleshootingIf Halive with GLFW segfaults on windows, try |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论