{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T04:14:58Z","timestamp":1750306498189,"version":"3.41.0"},"reference-count":22,"publisher":"Association for Computing Machinery (ACM)","issue":"8S","license":[{"start":{"date-parts":[[2015,12,4]],"date-time":"2015-12-04T00:00:00Z","timestamp":1449187200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["SIGPLAN Not."],"published-print":{"date-parts":[[2015,12,4]]},"abstract":"<jats:p>Writing boilerplate code is a royal pain. Generic programming promises to alleviate this pain by allowing the programmer to write a generic \"recipe\" for boilerplate code, and use that recipe in many places. In earlier work we introduced the \"Scrap your boilerplate\" approach to generic programming, which exploits Haskell's existing type-class mechanism to support generic transformations and queries.<\/jats:p>\n          <jats:p>This paper completes the picture. We add a few extra \"introspective\" or \"reflective\" facilities, that together support a rich variety of serialisation and de-serialisation. We also show how to perform generic \"zips\", which at first appear to be somewhat tricky in our framework. Lastly, we generalise the ability to over-ride a generic function with a type-specific one.<\/jats:p>\n          <jats:p>All of this can be supported in Haskell with independently-useful extensions: higher-rank types and type-safe cast. The GHC implementation of Haskell readily derives the required type classes for user-defined data types.<\/jats:p>","DOI":"10.1145\/2854695.2854698","type":"journal-article","created":{"date-parts":[[2015,12,7]],"date-time":"2015-12-07T19:33:52Z","timestamp":1449516832000},"page":"23-34","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["ICFP 2004"],"prefix":"10.1145","volume":"50","author":[{"given":"Ralf","family":"L\u00e4mmel","sequence":"first","affiliation":[{"name":"Vrije Universiteit &amp; CWI, Amsterdam"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Simon Peyton","family":"Jones","sequence":"additional","affiliation":[{"name":"Microsoft Research, Cambridge"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2015,12,4]]},"reference":[{"key":"e_1_2_1_1_1","volume-title":"Generic Programming, 2003. Proceedings of the IFIP TC2 Working Conference on Generic Programming","author":"Altenkirch T.","year":"2002","unstructured":"T. Altenkirch and C. McBride . Generic programming within dependently typed programming . In Generic Programming, 2003. Proceedings of the IFIP TC2 Working Conference on Generic Programming , Schloss Dagstuhl , July 2002 . T. Altenkirch and C. McBride. Generic programming within dependently typed programming. In Generic Programming, 2003. Proceedings of the IFIP TC2 Working Conference on Generic Programming, Schloss Dagstuhl, July 2002."},{"key":"e_1_2_1_2_1","series-title":"LNCS","doi-asserted-by":"crossref","first-page":"71","DOI":"10.1007\/978-3-540-24836-1_6","volume-title":"Practical Aspects of Declarative Languages: 6th International Symposium, PADL","author":"Atanassow F.","year":"2004","unstructured":"F. Atanassow , D. Clarke , and J. Jeuring . UUXML: A Type-Preserving XML Schema-Haskell Data Binding . In B. Jayaraman, editor, Practical Aspects of Declarative Languages: 6th International Symposium, PADL 2004 , Dallas, TX , USA, June 18-19, 2004. Proceedings, volume 3057 of LNCS , pages 71 -- 85 . Springer-Verlag , May 2004. F. Atanassow, D. Clarke, and J. Jeuring. UUXML: A Type-Preserving XML Schema-Haskell Data Binding. In B. Jayaraman, editor, Practical Aspects of Declarative Languages: 6th International Symposium, PADL 2004, Dallas, TX, USA, June 18-19, 2004. Proceedings, volume 3057 of LNCS, pages 71--85. Springer-Verlag, May 2004."},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/351240.351266"},{"key":"e_1_2_1_4_1","volume-title":"The Generic Haskell User's Guide","author":"Clarke D.","year":"2002","unstructured":"D. Clarke , J. Jeuring , and A. L\u00f6h . The Generic Haskell User's Guide , 2002 . Version 1.23 - Beryl release. D. Clarke, J. Jeuring, and A. L\u00f6h. The Generic Haskell User's Guide, 2002. Version 1.23 - Beryl release."},{"key":"e_1_2_1_5_1","volume-title":"Proc. of the IFIP TC2 Working Conference on Generic Programming. Kluwer Academic Publishers","author":"Clarke D.","year":"2003","unstructured":"D. Clarke and A. L\u00f6h . Generic Haskell, Specifically. In J. Gibbons and J. Jeuring, editors , Proc. of the IFIP TC2 Working Conference on Generic Programming. Kluwer Academic Publishers , 2003 . D. Clarke and A. L\u00f6h. Generic Haskell, Specifically. In J. Gibbons and J. Jeuring, editors, Proc. of the IFIP TC2 Working Conference on Generic Programming. Kluwer Academic Publishers, 2003."},{"issue":"3","key":"e_1_2_1_6_1","first-page":"355","volume":"24","author":"Harm J.","year":"2000","unstructured":"J. Harm and R. L#228;mmel . Two-dimensional Approximation Coverage. Informatica , 24 ( 3 ): 355 -- 369 , 2000 . J. Harm and R. L#228;mmel. Two-dimensional Approximation Coverage. Informatica, 24(3):355--369, 2000.","journal-title":"Two-dimensional Approximation Coverage. Informatica"},{"key":"e_1_2_1_7_1","volume-title":"Proc. 3rd Haskell Workshop","author":"Hinze R.","year":"1999","unstructured":"R. Hinze . A generic programming extension for Haskell . In Proc. 3rd Haskell Workshop , Paris, France , 1999 . Technical report of Universiteit Utrecht, UU-CS-1999-28. R. Hinze. A generic programming extension for Haskell. In Proc. 3rd Haskell Workshop, Paris, France, 1999. Technical report of Universiteit Utrecht, UU-CS-1999-28."},{"key":"e_1_2_1_8_1","volume-title":"Generics for the masses. In these proceedings","author":"Hinze R.","year":"2004","unstructured":"R. Hinze . Generics for the masses. In these proceedings , 2004 . R. Hinze. Generics for the masses. In these proceedings, 2004."},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(86)90059-1"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796898003050"},{"key":"e_1_2_1_11_1","volume-title":"SIGPLAN International Conference on Functional Programming (ICFP'00)","author":"ACM","year":"2000","unstructured":"ACM SIGPLAN International Conference on Functional Programming (ICFP'00) , Montreal , Sept. 2000 . ACM. ACM SIGPLAN International Conference on Functional Programming (ICFP'00), Montreal, Sept. 2000. ACM."},{"key":"e_1_2_1_12_1","volume-title":"Proc. of Workshop on Generic Programming, WGP'98","author":"Jansson P.","year":"1998","unstructured":"P. Jansson and J. Jeuring . PolyLib\u00bfA library of polytypic functions. In R. Backhouse and T. Sheard, editors , Proc. of Workshop on Generic Programming, WGP'98 , Marstrand, Sweden. Dept. of Comp. Science, Chalmers Univ. of Techn. and G\u00f6teborg Univ. , June 1998 . P. Jansson and J. Jeuring. PolyLib\u00bfA library of polytypic functions. In R. Backhouse and T. Sheard, editors, Proc. of Workshop on Generic Programming, WGP'98, Marstrand, Sweden. Dept. of Comp. Science, Chalmers Univ. of Techn. and G\u00f6teborg Univ., June 1998."},{"key":"e_1_2_1_13_1","unstructured":"C. B. Jay. The pattern calculus. http:\/\/www-staff.it.uts.edu.au\/\u00bfcbj\/Publications\/pattern_calculus.ps 2003. (accepted Gast: Generic Automated Software Testing. In R. Pena and T. Arts editors Implementation of Functional Languages 14th International Workshop IFL 2002 Madrid Spain September 16-18 2002 Revised Selected Papers volume 2670 of LNCS pages 84--100. Springer-Verlag 2003.   C. B. Jay. The pattern calculus. http:\/\/www-staff.it.uts.edu.au\/\u00bfcbj\/Publications\/pattern_calculus.ps 2003. (accepted Gast: Generic Automated Software Testing. In R. Pena and T. Arts editors Implementation of Functional Languages 14th International Workshop IFL 2002 Madrid Spain September 16-18 2002 Revised Selected Papers volume 2670 of LNCS pages 84--100. Springer-Verlag 2003."},{"key":"e_1_2_1_14_1","series-title":"Notes Series NS-01-4","first-page":"109","volume-title":"Proc. Formal Approaches to Testing of Software (FATES'01)","author":"L\u00e4mmel R.","year":"2001","unstructured":"R. L\u00e4mmel and J. Harm . Test case characterisation by regular path expressions . In E. Brinksma and J. Tretmans, editors, Proc. Formal Approaches to Testing of Software (FATES'01) , Notes Series NS-01-4 , pages 109 -- 124 . BRICS , Aug. 2001 . R. L\u00e4mmel and J. Harm. Test case characterisation by regular path expressions. In E. Brinksma and J. Tretmans, editors, Proc. Formal Approaches to Testing of Software (FATES'01), Notes Series NS-01-4, pages 109--124. BRICS, Aug. 2001."},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/640136.604179"},{"volume-title":"examples, browsable library, papers, background","year":"2003","key":"e_1_2_1_16_1","unstructured":"The \"Scrap your boilerplate\" web site : examples, browsable library, papers, background , 2003 -2004. http:\/\/www.cs.vu.nl\/boilerplate\/. The \"Scrap your boilerplate\" web site: examples, browsable library, papers, background, 2003-2004. http:\/\/www.cs.vu.nl\/boilerplate\/."},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/45072.45074"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/944705.944719"},{"key":"e_1_2_1_19_1","volume-title":"Practical type inference for higherrank types. Unpublished manuscript","author":"Peyton Jones S.","year":"2004","unstructured":"S. Peyton Jones and M. Shields . Practical type inference for higherrank types. Unpublished manuscript , 2004 . S. Peyton Jones and M. Shields. Practical type inference for higherrank types. Unpublished manuscript, 2004."},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/317636.317794"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/351240.351246"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/214762.214771"}],"container-title":["ACM SIGPLAN Notices"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/2854695.2854698","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/2854695.2854698","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T05:48:47Z","timestamp":1750225727000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/2854695.2854698"}},"subtitle":["Scrap More Boilerplate: Reflection, Zips, and Generalised Casts"],"short-title":[],"issued":{"date-parts":[[2015,12,4]]},"references-count":22,"journal-issue":{"issue":"8S","published-print":{"date-parts":[[2015,12,4]]}},"alternative-id":["10.1145\/2854695.2854698"],"URL":"https:\/\/doi.org\/10.1145\/2854695.2854698","relation":{},"ISSN":["0362-1340","1558-1160"],"issn-type":[{"type":"print","value":"0362-1340"},{"type":"electronic","value":"1558-1160"}],"subject":[],"published":{"date-parts":[[2015,12,4]]},"assertion":[{"value":"2015-12-04","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}