{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T04:22:02Z","timestamp":1750306922360,"version":"3.41.0"},"reference-count":11,"publisher":"Association for Computing Machinery (ACM)","issue":"12","license":[{"start":{"date-parts":[[2012,9,13]],"date-time":"2012-09-13T00:00:00Z","timestamp":1347494400000},"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":[[2013,1,17]]},"abstract":"<jats:p>The specification of a class in Haskell often starts with stating, in comments, the laws that should be satisfied by methods defined in instances of the class, followed by the type of the methods of the class. This paper develops a framework that supports testing such class laws using QuickCheck. Our framework is a light-weight class law testing framework, which requires a limited amount of work per class law, and per datatype for which the class law is tested. We also show how to test class laws with partially-defined values. Using partially-defined values, we show that the standard lazy and strict implementations of the state monad do not satisfy the expected laws.<\/jats:p>","DOI":"10.1145\/2430532.2364514","type":"journal-article","created":{"date-parts":[[2013,1,22]],"date-time":"2013-01-22T15:28:56Z","timestamp":1358868536000},"page":"49-60","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Testing type class laws"],"prefix":"10.1145","volume":"47","author":[{"given":"Johan","family":"Jeuring","sequence":"first","affiliation":[{"name":"Utrecht University &amp; Open Universiteit, Utrecht, Netherlands"}]},{"given":"Patrik","family":"Jansson","sequence":"additional","affiliation":[{"name":"Chalmers University of Technology, G\u00f6teborg, Sweden"}]},{"given":"Cl\u00e1udio","family":"Amaral","sequence":"additional","affiliation":[{"name":"Chalmers University of Technology, G\u00f6teborg, Sweden"}]}],"member":"320","published-online":{"date-parts":[[2012,9,13]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-11957-6_8"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/1040305.1040306"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/351240.351266"},{"key":"e_1_2_1_4_1","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"crossref","first-page":"85","DOI":"10.1007\/978-3-540-27764-4_6","volume-title":"MPC'04","author":"Danielsson N. A.","year":"2004","unstructured":"N. A. Danielsson and P. Jansson . Chasing bottoms: A case study in program verification in the presence of partial and infinite values . In MPC'04 , volume 3125 of Lecture Notes in Computer Science , pages 85 -- 109 . Springer , 2004 . N. A. Danielsson and P. Jansson. Chasing bottoms: A case study in program verification in the presence of partial and infinite values. In MPC'04, volume 3125 of Lecture Notes in Computer Science, pages 85--109. Springer, 2004."},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/1111037.1111056"},{"key":"e_1_2_1_6_1","volume-title":"A Haskell package available on Hackage","author":"Elliott C.","year":"2012","unstructured":"C. Elliott . Checkers. A Haskell package available on Hackage , 2012 . URL http:\/\/hackage.haskell.org\/package\/checkers-0.2.9. C. Elliott. Checkers. A Haskell package available on Hackage, 2012. URL http:\/\/hackage.haskell.org\/package\/checkers-0.2.9."},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2034773.2034777"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0167-6423(01)00020-X"},{"key":"e_1_2_1_9_1","volume-title":"Haskell 2010 Language Report","author":"Marlow S.","year":"2010","unstructured":"S. Marlow , editor. Haskell 2010 Language Report , 2010 . http:\/\/www.haskell.org\/onlinereport\/haskell2010\/. S. Marlow, editor. Haskell 2010 Language Report, 2010. http:\/\/www.haskell.org\/onlinereport\/haskell2010\/."},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/1411286.1411292"},{"key":"e_1_2_1_11_1","volume-title":"Quickchecking type class laws. Blog post","author":"Taysom W.","year":"2011","unstructured":"W. Taysom . Quickchecking type class laws. Blog post , 2011 . URL http:\/\/www.cubiclemuses.com\/cm\/articles\/2011\/07\/14\/quickchecking-type-class-laws\/. W. Taysom. Quickchecking type class laws. Blog post, 2011. URL http:\/\/www.cubiclemuses.com\/cm\/articles\/2011\/07\/14\/quickchecking-type-class-laws\/."}],"container-title":["ACM SIGPLAN Notices"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/2430532.2364514","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/2430532.2364514","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T08:35:23Z","timestamp":1750235723000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/2430532.2364514"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2012,9,13]]},"references-count":11,"journal-issue":{"issue":"12","published-print":{"date-parts":[[2013,1,17]]}},"alternative-id":["10.1145\/2430532.2364514"],"URL":"https:\/\/doi.org\/10.1145\/2430532.2364514","relation":{"is-identical-to":[{"id-type":"doi","id":"10.1145\/2364506.2364514","asserted-by":"subject"}]},"ISSN":["0362-1340","1558-1160"],"issn-type":[{"type":"print","value":"0362-1340"},{"type":"electronic","value":"1558-1160"}],"subject":[],"published":{"date-parts":[[2012,9,13]]},"assertion":[{"value":"2012-09-13","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}