类型安全的Redis编程:Haskell中的类型级编程案例研究
Type Safe Redis Queries: A Case Study of Type-Level Programming in Haskell
摘要:
Redis是一种内存中的数据结构存储,通常用作数据库,具有Haskell接口Hedis。Redis是动态类型的--一个键可以被丢弃并重新关联到一个不同类型的值,当一个命令获取一个它不期望的类型的值时,它会发出一个运行时错误的信号。我们开发了一种特定于域的语言,通过利用Haskell的类型级编程技术,包括索引monad,类型级字面量和封闭类型家族,跟踪数据库中的值类型,并静态地保证一类Redis程序不会发生类型错误。
英文摘要:
Redis is an in-memory data structure store, often used as a database, with a Haskell interface Hedis. Redis is dynamically typed --- a key can be discarded and re-associated to a value of a different type, and a command, when fetching a value of a type it does not expect, signals a runtime error. We develop a domain-specific language that, by exploiting Haskell type-level programming techniques including indexed monad, type-level literals and closed type families, keeps track of types of values in the database and statically guarantees that type errors cannot happen for a class of Redis programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。