【24h】

Events in Haskell, and How to Implement Them

机译:Haskell的活动,以及如何实现它们

获取原文

摘要

We describe a new and simpler implementation in Haskell of CML's events, which encode reactions by a thread to combinations of messages from other threads. We add a new type of Guarded Events, by which recipients can filter messages with conditions on their value known as Guards. We implement guarded channels. The guard type and the indexing algorithm are not part of the channel definition, so that the user can trade off what guards are required against the cost of indexing. As an example we sketch the encapsulation of a graphical user interface toolkit. This can be done concisely not only because of guarded events, but also because we construct, events monadically. Monadic events are especially helpful for representing concurrent processes which transform themselves in reaction to external communications.
机译:我们在CML的事件的Haskell中描述了一种新的和更简单的实现,它通过线程对来自其他线程的消息的组合编码反应。我们添加了一种新类型的守护事件,通过该事件,收件人可以在其所谓的警卫中过滤带有条件的消息。我们实施守卫渠道。保护类型和索引算法不是通道定义的一部分,因此用户可以折衷索引成本所需的守卫。作为示例,我们绘制了图形用户界面工具包的封装。这可以不仅因为被保护的事件而简明扼要地完成,而且因为我们构建了,可以自由地区。 Monadic Events对于代表并行进程特别有用,该过程将自己转变为对外通信的反应。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号