在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):willdonnelly/dyre开源软件地址(OpenSource Url):https://github.com/willdonnelly/dyre开源编程语言(OpenSource Language):Haskell 92.0%开源软件介绍(OpenSource Introduction):Dyre - A Dynamic Reconfiguration Library for HaskellDyre implements a basic interface for dynamically recompiling Haskell programs with new configurations. The inspiration for all this is, of course, Xmonad's reconfiguration functionality. It is similar in usage to the HConf library which was written for the Yi editor. Basic UsageThe main interface to the Dyre library consists of three items: a datatype for configuration data, a set of default values, and a function which makes that data into an entry-point function. A complete, working example can be seen here:
This code defines a simple library which will display a message on stdout. It uses Dyre to provide configuration of what exactly the message is. The default configuration could look something like this:
While a user's custom configuration would be more like this:
This example can be run without installing. Simply run The The For the other parameters Dyre uses, consult the [^1] You can compile it with Restarting and Persistent StateRestarting is handled by the If the state needs to be preserved, there are two pairs of functions available.
When your program starts, you will want to use either the Then to restart and persist the state, use the function |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论