{"title":"Idris中的可扩展记录","authors":"Gonzalo Waszczuk, Alberto Pardo, Marcos Viera","doi":"10.1145/3125374.3125384","DOIUrl":null,"url":null,"abstract":"Extensible records are records structures that can be dynamically extended with new fields. In some languages, extensible records are supported as a primitive, in others they are implemented as a user library, each alternative with its benefits and drawbacks. This paper presents a library to strongly-typed extensible records in Idris, a functional programming language with dependent types. Like HList, a Haskell library for extensible records, we use heterogeneous lists to represent our records, but now exploiting the power of dependent types. We show the benefits of our solution by means of examples.","PeriodicalId":430395,"journal":{"name":"Proceedings of the 21st Brazilian Symposium on Programming Languages","volume":"27 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-09-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Extensible records in Idris\",\"authors\":\"Gonzalo Waszczuk, Alberto Pardo, Marcos Viera\",\"doi\":\"10.1145/3125374.3125384\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Extensible records are records structures that can be dynamically extended with new fields. In some languages, extensible records are supported as a primitive, in others they are implemented as a user library, each alternative with its benefits and drawbacks. This paper presents a library to strongly-typed extensible records in Idris, a functional programming language with dependent types. Like HList, a Haskell library for extensible records, we use heterogeneous lists to represent our records, but now exploiting the power of dependent types. We show the benefits of our solution by means of examples.\",\"PeriodicalId\":430395,\"journal\":{\"name\":\"Proceedings of the 21st Brazilian Symposium on Programming Languages\",\"volume\":\"27 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-09-21\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 21st Brazilian Symposium on Programming Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3125374.3125384\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 21st Brazilian Symposium on Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3125374.3125384","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Extensible records are records structures that can be dynamically extended with new fields. In some languages, extensible records are supported as a primitive, in others they are implemented as a user library, each alternative with its benefits and drawbacks. This paper presents a library to strongly-typed extensible records in Idris, a functional programming language with dependent types. Like HList, a Haskell library for extensible records, we use heterogeneous lists to represent our records, but now exploiting the power of dependent types. We show the benefits of our solution by means of examples.