首页 > 最新文献

ACM SIGPLAN Symposium/Workshop on Haskell最新文献

英文 中文
Shared subtypes: subtyping recursive parametrized algebraic data types 共享子类型:子类型递归参数化代数数据类型
Pub Date : 2008-09-25 DOI: 10.1145/1411286.1411297
Ki Yung Ahn, T. Sheard
A newtype declaration in Haskell introduces a new type renaming an existing type. The two types are viewed by the programmer as semantically different, but share the same runtime representation. When operations on the two semantic views coincide, the run-time cost of conversion between the two types is reduced to zero (in both directions) because of this common representation. We describe a new language feature called Shared Subtypes (SSubtypes), which generalizes these properties of the newtype declaration. SSubtypes allow programmers to specify subtype rules between types and sharing rules between data constructors. A value of a type T, where T is a subtype of U, can always be cast, at no cost, to value of type U. This free up-casting allows library functions that consume the supertype to be applied without cost to subtypes. Yet any semantic interpretations desired by the programmer can be enforced by the compiler. SSubtype declarations work particularly well with GADTs. GADTs use differing type indexes to make explicit semantic differences, by using a different index for each way of viewing the data. Shared subtypes allow GADTs to share the same runtime representation as a reference type, of which the GADT is a refinement.
Haskell中的newtype声明引入了一个新类型,可以重命名现有类型。程序员认为这两种类型在语义上是不同的,但是共享相同的运行时表示。当两个语义视图上的操作重合时,由于这种通用表示,两种类型之间转换的运行时成本(在两个方向上)降低为零。我们描述了一个称为共享子类型(SSubtypes)的新语言特性,它泛化了newtype声明的这些属性。SSubtypes允许程序员在类型之间指定子类型规则,并在数据构造函数之间共享规则。类型T的值(其中T是U的子类型)总是可以免费转换为类型U的值。这种免费的向上转换允许使用超类型的标准库函数可以免费应用于子类型。然而,程序员想要的任何语义解释都可以由编译器强制执行。s子类型声明对gadt特别有效。gadt使用不同的类型索引,通过对每一种查看数据的方式使用不同的索引,来产生显式的语义差异。共享子类型允许GADT作为引用类型共享相同的运行时表示,GADT是引用类型的细化。
{"title":"Shared subtypes: subtyping recursive parametrized algebraic data types","authors":"Ki Yung Ahn, T. Sheard","doi":"10.1145/1411286.1411297","DOIUrl":"https://doi.org/10.1145/1411286.1411297","url":null,"abstract":"A newtype declaration in Haskell introduces a new type renaming an existing type. The two types are viewed by the programmer as semantically different, but share the same runtime representation. When operations on the two semantic views coincide, the run-time cost of conversion between the two types is reduced to zero (in both directions) because of this common representation.\u0000 We describe a new language feature called Shared Subtypes (SSubtypes), which generalizes these properties of the newtype declaration. SSubtypes allow programmers to specify subtype rules between types and sharing rules between data constructors. A value of a type T, where T is a subtype of U, can always be cast, at no cost, to value of type U. This free up-casting allows library functions that consume the supertype to be applied without cost to subtypes. Yet any semantic interpretations desired by the programmer can be enforced by the compiler. SSubtype declarations work particularly well with GADTs. GADTs use differing type indexes to make explicit semantic differences, by using a different index for each way of viewing the data. Shared subtypes allow GADTs to share the same runtime representation as a reference type, of which the GADT is a refinement.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"21 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116225233","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 5
Haskell session types with (almost) no class Haskell会话类型(几乎)没有类
Pub Date : 2008-09-25 DOI: 10.1145/1411286.1411290
Riccardo Pucella, Jesse A. Tov
We describe an implementation of session types in Haskell. Session types statically enforce that client-server communication proceeds according to protocols. They have been added to several concurrent calculi, but few implementations of session types are available. Our embedding takes advantage of Haskell where appropriate, but we rely on no exotic features. Thus our approach translates with minimal modification to other polymorphic, typed languages such as ML and Java. Our implementation works with existing Haskell concurrency mechanisms, handles multiple communication channels and recursive session types, and infers protocols automatically. While our implementation uses unsafe operations in Haskell, it does not violate Haskell's safety guarantees. We formalize this claim in a concurrent calculus with unsafe communication primitives over which we layer our implementation of session types, and we prove that the session types layer is safe. In particular, it enforces that channel-based communication follows consistent protocols.
我们描述了在Haskell中会话类型的实现。会话类型静态地强制客户端-服务器通信按照协议进行。它们已经被添加到几个并发演算中,但是会话类型的实现很少可用。我们的嵌入在适当的地方利用了Haskell,但我们不依赖于外来特性。因此,我们的方法以最小的修改转换为其他多态,类型语言,如ML和Java。我们的实现与现有的Haskell并发机制一起工作,处理多个通信通道和递归会话类型,并自动推断协议。虽然我们的实现在Haskell中使用了不安全的操作,但它并没有违反Haskell的安全保证。我们在使用不安全通信原语的并发演算中形式化了这一声明,在此基础上我们对会话类型的实现进行了分层,并证明了会话类型层是安全的。特别是,它强制基于通道的通信遵循一致的协议。
{"title":"Haskell session types with (almost) no class","authors":"Riccardo Pucella, Jesse A. Tov","doi":"10.1145/1411286.1411290","DOIUrl":"https://doi.org/10.1145/1411286.1411290","url":null,"abstract":"We describe an implementation of session types in Haskell. Session types statically enforce that client-server communication proceeds according to protocols. They have been added to several concurrent calculi, but few implementations of session types are available.\u0000 Our embedding takes advantage of Haskell where appropriate, but we rely on no exotic features. Thus our approach translates with minimal modification to other polymorphic, typed languages such as ML and Java. Our implementation works with existing Haskell concurrency mechanisms, handles multiple communication channels and recursive session types, and infers protocols automatically.\u0000 While our implementation uses unsafe operations in Haskell, it does not violate Haskell's safety guarantees. We formalize this claim in a concurrent calculus with unsafe communication primitives over which we layer our implementation of session types, and we prove that the session types layer is safe. In particular, it enforces that channel-based communication follows consistent protocols.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"29 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115066243","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 110
Comparing libraries for generic programming in haskell 比较haskell中泛型编程的库
Pub Date : 2008-09-25 DOI: 10.1145/1411286.1411301
A. R. Yakushev, J. Jeuring, Patrik Jansson, Alex Gerdes, O. Kiselyov, B. C. D. S. Oliveira
Datatype-generic programming is defining functions that depend on the structure, or "shape", of datatypes. It has been around for more than 10 years, and a lot of progress has been made, in particular in the lazy functional programming language Haskell. There are morethan 10 proposals for generic programming libraries orlanguage extensions for Haskell. To compare and characterise the many generic programming libraries in atyped functional language, we introduce a set of criteria and develop a generic programming benchmark: a set of characteristic examples testing various facets of datatype-generic programming. We have implemented the benchmark for nine existing Haskell generic programming libraries and present the evaluation of the libraries. The comparison is useful for reaching a common standard for generic programming, but also for a programmer who has to choose a particular approach for datatype-generic programming.
数据类型泛型编程是定义依赖于数据类型的结构或“形状”的函数。它已经存在了10多年,取得了很大的进步,特别是在惰性函数式编程语言Haskell方面。Haskell有10多个泛型编程库或语言扩展的建议。为了比较和描述类型化函数式语言中的许多泛型编程库,我们引入了一组标准并开发了一个泛型编程基准:一组测试数据类型泛型编程各个方面的典型示例。我们已经为9个现有的Haskell泛型编程库实现了基准测试,并给出了对这些库的评估。这种比较对于达到通用的泛型编程标准很有用,而且对于必须为数据类型泛型编程选择特定方法的程序员也很有用。
{"title":"Comparing libraries for generic programming in haskell","authors":"A. R. Yakushev, J. Jeuring, Patrik Jansson, Alex Gerdes, O. Kiselyov, B. C. D. S. Oliveira","doi":"10.1145/1411286.1411301","DOIUrl":"https://doi.org/10.1145/1411286.1411301","url":null,"abstract":"Datatype-generic programming is defining functions that depend on the structure, or \"shape\", of datatypes. It has been around for more than 10 years, and a lot of progress has been made, in particular in the lazy functional programming language Haskell. There are morethan 10 proposals for generic programming libraries orlanguage extensions for Haskell. To compare and characterise the many generic programming libraries in atyped functional language, we introduce a set of criteria and develop a generic programming benchmark: a set of characteristic examples testing various facets of datatype-generic programming. We have implemented the benchmark for nine existing Haskell generic programming libraries and present the evaluation of the libraries. The comparison is useful for reaching a common standard for generic programming, but also for a programmer who has to choose a particular approach for datatype-generic programming.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"73 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121486784","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 88
Yi: an editor in haskell for haskell Yi: haskell的编辑
Pub Date : 2008-09-25 DOI: 10.1145/1411286.1411294
Jean-Philippe Bernardy
Yi is a text editor written in Haskell and extensible in Haskell. We take advantage of Haskell's expressive power to define embedded DSLs that form the foundation of the editor. In turn, these DSLs provide a flexible mechanism to create extended versions of the editor. Yi also provides some support for editing Haskell code.
Yi是一个用Haskell编写并可扩展的文本编辑器。我们利用Haskell的表达能力来定义嵌入式dsl,这些dsl构成了编辑器的基础。反过来,这些dsl提供了灵活的机制来创建编辑器的扩展版本。Yi还提供了一些编辑Haskell代码的支持。
{"title":"Yi: an editor in haskell for haskell","authors":"Jean-Philippe Bernardy","doi":"10.1145/1411286.1411294","DOIUrl":"https://doi.org/10.1145/1411286.1411294","url":null,"abstract":"Yi is a text editor written in Haskell and extensible in Haskell. We take advantage of Haskell's expressive power to define embedded DSLs that form the foundation of the editor. In turn, these DSLs provide a flexible mechanism to create extended versions of the editor. Yi also provides some support for editing Haskell code.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"45 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116198519","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 9
A library for light-weight information-flow security in haskell 一个用于haskell中轻量级信息流安全的库
Pub Date : 2008-09-25 DOI: 10.1145/1411286.1411289
Alejandro Russo, Koen Claessen, John Hughes
Protecting confidentiality of data has become increasingly important for computing systems. Information-flow techniques have been developed over the years to achieve that purpose, leading to special-purpose languages that guarantee information-flow security in programs. However, rather than producing a new language from scratch, information-flow security can also be provided as a library. This has been done previously in Haskell using the arrow framework. In this paper, we show that arrows are not necessary to design such libraries and that a less general notion, namely monads, is sufficient to achieve the same goals. We present a monadic library to provide information-flow security for Haskell programs. The library introduces mechanisms to protect confidentiality of data for pure computations, that we then easily, and modularly, extend to include dealing with side-effects. We also present combinators to dynamically enforce different declassification policies when release of information is required in a controlled manner. It is possible to enforce policies related to what, by whom, and when information is released or a combination of them. The well-known concept of monads together with the light-weight characteristic of our approach makes the library suitable to build applications where confidentiality of data is an issue.
保护数据的机密性对于计算系统来说变得越来越重要。多年来,信息流技术的发展就是为了实现这一目的,从而产生了保证程序中信息流安全的专用语言。但是,信息流安全性也可以作为库提供,而不是从头开始生成一种新语言。这已经在Haskell中使用箭头框架完成了。在本文中,我们展示了箭头对于设计这样的库是不必要的,并且一个不太通用的概念,即单子,足以实现相同的目标。我们提出了一个一元库来为Haskell程序提供信息流安全。该库引入了保护纯计算数据机密性的机制,然后我们可以轻松地、模块化地对其进行扩展,以包括处理副作用。当需要以受控的方式发布信息时,我们还提出了组合子来动态执行不同的解密策略。可以执行与发布信息的内容、由谁发布以及何时发布相关的策略,或者将这些策略组合在一起。众所周知的单子概念和我们方法的轻量级特性使得这个库适合构建数据保密性有问题的应用程序。
{"title":"A library for light-weight information-flow security in haskell","authors":"Alejandro Russo, Koen Claessen, John Hughes","doi":"10.1145/1411286.1411289","DOIUrl":"https://doi.org/10.1145/1411286.1411289","url":null,"abstract":"Protecting confidentiality of data has become increasingly important for computing systems. Information-flow techniques have been developed over the years to achieve that purpose, leading to special-purpose languages that guarantee information-flow security in programs. However, rather than producing a new language from scratch, information-flow security can also be provided as a library. This has been done previously in Haskell using the arrow framework. In this paper, we show that arrows are not necessary to design such libraries and that a less general notion, namely monads, is sufficient to achieve the same goals. We present a monadic library to provide information-flow security for Haskell programs. The library introduces mechanisms to protect confidentiality of data for pure computations, that we then easily, and modularly, extend to include dealing with side-effects. We also present combinators to dynamically enforce different declassification policies when release of information is required in a controlled manner. It is possible to enforce policies related to what, by whom, and when information is released or a combination of them. The well-known concept of monads together with the light-weight characteristic of our approach makes the library suitable to build applications where confidentiality of data is an issue.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"210 4","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"120899764","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 98
Beauty in the beast 野兽中的美女
Pub Date : 2007-09-30 DOI: 10.1145/1291201.1291206
Wouter Swierstra, Thorsten Altenkirch
It can be very difficult to debug impure code, let alone prove its correctness. To address these problems, we provide a functional specification of three central components of Peyton Jones's awkward squad: teletype IO, mutable state, and concurrency. By constructing an internal model of such concepts within our programming language, we can test, debug, and reason about programs that perform IO as if they were pure. In particular, we demonstrate how our specifications may be used in tandem with QuickCheck to automatically test complex pointer algorithms and concurrent programs.
调试不纯的代码可能非常困难,更不用说证明其正确性了。为了解决这些问题,我们提供了Peyton Jones的三个核心组件的功能规范:电传IO、可变状态和并发性。通过在编程语言中构造这些概念的内部模型,我们可以对执行IO的程序进行测试、调试和推理,就好像它们是纯IO一样。特别是,我们演示了如何将我们的规范与QuickCheck一起使用,以自动测试复杂的指针算法和并发程序。
{"title":"Beauty in the beast","authors":"Wouter Swierstra, Thorsten Altenkirch","doi":"10.1145/1291201.1291206","DOIUrl":"https://doi.org/10.1145/1291201.1291206","url":null,"abstract":"It can be very difficult to debug impure code, let alone prove its correctness. To address these problems, we provide a functional specification of three central components of Peyton Jones's awkward squad: teletype IO, mutable state, and concurrency. By constructing an internal model of such concepts within our programming language, we can test, debug, and reason about programs that perform IO as if they were pure. In particular, we demonstrate how our specifications may be used in tandem with QuickCheck to automatically test complex pointer algorithms and concurrent programs.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"13 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-09-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133807941","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 64
Comprehensive comprehensions 全面的理解
Pub Date : 2007-09-30 DOI: 10.1145/1291201.1291209
S. Jones, P. Wadler
We propose an extension to list comprehensions that makes it easy to express the kind of queries one would write in SQL using ORDER BY, GROUP BY, and LIMIT. Our extension adds expressive power to comprehensions, and generalises the SQL constructs that inspired it. It is easy to implement, using simple desugaring rules.
我们建议对列表推导式进行扩展,以方便表达使用ORDER BY、GROUP BY和LIMIT在SQL中编写的查询类型。我们的扩展为推导式增加了表达能力,并推广了启发它的SQL结构。它很容易实现,使用简单的脱糖规则。
{"title":"Comprehensive comprehensions","authors":"S. Jones, P. Wadler","doi":"10.1145/1291201.1291209","DOIUrl":"https://doi.org/10.1145/1291201.1291209","url":null,"abstract":"We propose an extension to list comprehensions that makes it easy to express the kind of queries one would write in SQL using ORDER BY, GROUP BY, and LIMIT. Our extension adds expressive power to comprehensions, and generalises the SQL constructs that inspired it. It is easy to implement, using simple desugaring rules.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-09-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129224927","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 50
Haskell program coverage Haskell项目覆盖范围
Pub Date : 2007-09-30 DOI: 10.1145/1291201.1291203
Andy Gill, C. Runciman
We describe the design, implementation and use of HPC, a tool-kit to record and display Haskell Program Coverage. HPC includes tools that instrument Haskell programs to record program coverage, run instrumented programs, and display information derived from coverage data in various ways.
我们描述了HPC的设计、实现和使用,HPC是一个记录和显示Haskell程序覆盖的工具包。HPC包括一些工具,这些工具使Haskell程序记录程序覆盖率,运行被测量的程序,并以各种方式显示来自覆盖率数据的信息。
{"title":"Haskell program coverage","authors":"Andy Gill, C. Runciman","doi":"10.1145/1291201.1291203","DOIUrl":"https://doi.org/10.1145/1291201.1291203","url":null,"abstract":"We describe the design, implementation and use of HPC, a tool-kit to record and display Haskell Program Coverage. HPC includes tools that instrument Haskell programs to record program coverage, run instrumented programs, and display information derived from coverage data in various ways.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"2014 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-09-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125696051","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 53
Why it's nice to be quoted: quasiquoting for haskell 为什么被引用很好:haskell的准引用
Pub Date : 2007-09-30 DOI: 10.1145/1291201.1291211
G. Mainland
Quasiquoting allows programmers to use domain specific syntax to construct program fragments. By providing concrete syntax for complex data types, programs become easier to read, easier to write, and easier to reason about and maintain. Haskell is an excellent host language for embedded domain specific languages, and quasiquoting ideally complements the language features that make Haskell perform so well in this area. Unfortunately, until now no Haskell compiler has provided support for quasiquoting. We present an implementation in GHC and demonstrate that by leveraging existing compiler capabilities, building a full quasiquoter requires little more work than writing a parser. Furthermore, we provide a compile-time guarantee that all quasiquoted data is type-correct.
准引用允许程序员使用特定于领域的语法来构造程序片段。通过为复杂的数据类型提供具体的语法,程序变得更容易阅读、更容易编写、更容易推理和维护。Haskell是嵌入式领域特定语言的优秀宿主语言,准引用是Haskell语言特性的理想补充,正是这些特性使Haskell在这一领域表现出色。不幸的是,直到现在还没有Haskell编译器提供准引用的支持。我们在GHC中给出了一个实现,并演示了通过利用现有的编译器功能,构建一个完整的准引号只需要编写一个解析器。此外,我们提供了一个编译时保证,所有准引用的数据都是类型正确的。
{"title":"Why it's nice to be quoted: quasiquoting for haskell","authors":"G. Mainland","doi":"10.1145/1291201.1291211","DOIUrl":"https://doi.org/10.1145/1291201.1291211","url":null,"abstract":"Quasiquoting allows programmers to use domain specific syntax to construct program fragments. By providing concrete syntax for complex data types, programs become easier to read, easier to write, and easier to reason about and maintain. Haskell is an excellent host language for embedded domain specific languages, and quasiquoting ideally complements the language features that make Haskell perform so well in this area. Unfortunately, until now no Haskell compiler has provided support for quasiquoting. We present an implementation in GHC and demonstrate that by leveraging existing compiler capabilities, building a full quasiquoter requires little more work than writing a parser. Furthermore, we provide a compile-time guarantee that all quasiquoted data is type-correct.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"4 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-09-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127717615","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 115
A shortcut fusion rule for circular program calculation 圆形程序计算的快捷融合规则
Pub Date : 2007-09-30 DOI: 10.1145/1291201.1291216
J. Fernandes, Alberto Pardo, J. Saraiva
Circular programs are a powerful technique to express multiple traversal algorithms as a single traversal function in a lazy setting. In this paper, we present a shortcut deforestation technique to calculate circular programs. The technique we propose takes as input the composition of two functions, such that the first builds an intermediate structure and some additional context information which are then processed by the second one, to produce the final result. Our transformation into circular programs achieves intermediate structure deforestation and multiple traversal elimination. Furthermore, the calculated programs preserve the termination properties of the original ones.
循环程序是一种强大的技术,可以在惰性设置中将多个遍历算法表示为单个遍历函数。本文提出了一种计算循环规划的快捷毁林技术。我们提出的技术将两个函数的组合作为输入,这样第一个函数建立一个中间结构和一些额外的上下文信息,然后由第二个函数处理,以产生最终结果。我们对循环方案的转换实现了中间结构的砍伐和多次遍历的消除。此外,计算程序还保留了原程序的终止特性。
{"title":"A shortcut fusion rule for circular program calculation","authors":"J. Fernandes, Alberto Pardo, J. Saraiva","doi":"10.1145/1291201.1291216","DOIUrl":"https://doi.org/10.1145/1291201.1291216","url":null,"abstract":"Circular programs are a powerful technique to express multiple traversal algorithms as a single traversal function in a lazy setting. In this paper, we present a shortcut deforestation technique to calculate circular programs. The technique we propose takes as input the composition of two functions, such that the first builds an intermediate structure and some additional context information which are then processed by the second one, to produce the final result. Our transformation into circular programs achieves intermediate structure deforestation and multiple traversal elimination. Furthermore, the calculated programs preserve the termination properties of the original ones.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"65 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-09-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128323276","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 27
期刊
ACM SIGPLAN Symposium/Workshop on Haskell
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1