【24h】

The Key Monad: Type-Safe Unconstrained Dynamic Typing

机译:关键的Monad:类型安全的无约束动态打字

获取原文
获取原文并翻译 | 示例
       

摘要

We present a small extension to Haskell called the Key monad. With the Key monad, unique keys of different types can be created and can be tested for equality. When two keys are equal, we also obtain a concrete proof that their types are equal. This gives us a form of dynamic typing, without the need for Typeable constraints. We show that our extension allows us to safely do things we could not otherwise do: it allows us to implement the ST monad (inefficiently), to implement an embedded form of arrow notation, and to translate parametric HOAS to typed de Bruijn indices, among others. Although strongly related to the ST monad, the Key monad is simpler and might be easier to prove safe. We do not provide such a proof of the safety of the Key monad, but we note that, surprisingly, a full proof of the safety of the ST monad also remains elusive to this day. Hence, another reason for studying the Key monad is that a safety proof for it might be a stepping stone towards a safety proof of the ST monad.
机译:我们为Haskell提供了一个小的延伸,称为关键的Monad。使用关键的Monad,可以创建不同类型的独特键,可以测试平等。当两个键相等时,我们还获得了它们的类型等于的具体证据。这为我们提供了一种动态键入的形式,而无需类型的约束。我们展示我们的扩展允许我们安全地做出我们无法做到的事情:它允许我们实现ST Monad(效率低),实现嵌入形式的箭头表示法,并将参数HOA转换为键入的de Bruijn指数其他。虽然与ST Monad强烈相关,但关键的Monad更简单,可能更容易证明安全。我们没有提供这种关键密码安全的证明,但我们注意到,令人惊讶的是,ST Monad安全的完全证明也令人难以捉摸。因此,研究关键的Monad的另一个原因是安全证据可能是朝着圣人安全证明的踏脚石。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号