Attribute grammars fly first-class... safer!: dealing with DSL errors in type-level programming

Juan García-Garland, Alberto Pardo, Marcos Viera
{"title":"Attribute grammars fly first-class... safer!: dealing with DSL errors in type-level programming","authors":"Juan García-Garland, Alberto Pardo, Marcos Viera","doi":"10.1145/3412932.3412942","DOIUrl":null,"url":null,"abstract":"AspectAG is a domain specific language embedded in Haskell to represent modular attribute grammars. In AspectAG attribute grammar fragments can be defined independently (even in separate modules) and then combined in a safe way. This flexibility is achieved through the use of extensible records, which are implemented using type-level programming techniques. Type-level programming support has remarkably evolved in Haskell since the first version of AspectAG was designed; having incorporated new features like data promotion and kind polymorphism, among others, which allows to program in a \"strongly typed\" way at the level of types in a similar way as when programming at the level of values. In this paper we redefine AspectAG applying the new type-level programming techniques. As a consequence, we obtain a more robust system with better error messages.","PeriodicalId":235054,"journal":{"name":"Proceedings of the 31st Symposium on Implementation and Application of Functional Languages","volume":"55 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 31st Symposium on Implementation and Application of Functional Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3412932.3412942","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

AspectAG is a domain specific language embedded in Haskell to represent modular attribute grammars. In AspectAG attribute grammar fragments can be defined independently (even in separate modules) and then combined in a safe way. This flexibility is achieved through the use of extensible records, which are implemented using type-level programming techniques. Type-level programming support has remarkably evolved in Haskell since the first version of AspectAG was designed; having incorporated new features like data promotion and kind polymorphism, among others, which allows to program in a "strongly typed" way at the level of types in a similar way as when programming at the level of values. In this paper we redefine AspectAG applying the new type-level programming techniques. As a consequence, we obtain a more robust system with better error messages.
属性语法是一流的……更安全!:处理类型级编程中的DSL错误
AspectAG是嵌入在Haskell中的特定领域语言,用于表示模块化属性语法。在AspectAG中,属性语法片段可以独立定义(甚至在单独的模块中),然后以安全的方式组合。这种灵活性是通过使用可扩展记录实现的,可扩展记录是使用类型级编程技术实现的。自从AspectAG的第一个版本被设计出来以来,类型级编程支持在Haskell中有了显著的发展;引入了数据提升和种类多态性等新特性,这些特性允许在类型级别以“强类型”方式编程,就像在值级别编程一样。在本文中,我们应用新的类型级编程技术重新定义了AspectAG。因此,我们获得了一个具有更好的错误消息的更健壮的系统。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信