{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,24]],"date-time":"2026-11-24T22:22:14Z","timestamp":1795558934526,"version":"4.11.0"},"reference-count":74,"publisher":"Cambridge University Press (CUP)","license":[{"start":{"date-parts":[[2019,2,8]],"date-time":"2019-02-08T00:00:00Z","timestamp":1549584000000},"content-version":"unspecified","delay-in-days":38,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[2019]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>\n                    Implicit programming (IP) mechanisms infer values by type-directed resolution, making programs more compact and easier to read. Examples of IP mechanisms include Haskell\u2019s type classes, Scala\u2019s implicits, Agda\u2019s instance arguments, Coq\u2019s type classes and Rust\u2019s traits. The design of IP mechanisms has led to heated debate: proponents of one school argue for the desirability of strong reasoning properties, while proponents of another school argue for the power and flexibility of local scoping or overlapping instances. The current state of affairs seems to indicate that the two goals are at odds with one another and cannot easily be reconciled. This paper presents COCHIS, the Calculus Of CoHerent ImplicitS, an improved variant of the implicit calculus that offers flexibility while preserving two key properties:\n                    <jats:italic>coherence<\/jats:italic>\n                    and\n                    <jats:italic>stability of type substitutions<\/jats:italic>\n                    . COCHIS supports polymorphism, local scoping, overlapping instances, first-class instances and higher-order rules, while remaining type-safe, coherent and stable under type substitution. We introduce a logical formulation of how to resolve implicits, which is simple but ambiguous and incoherent, and a second formulation, which is less simple but unambiguous, coherent and stable. Every resolution of the second formulation is also a resolution of the first, but not conversely. Parts of the second formulation bear a close resemblance to a standard technique for proof search called focusing. Moreover, key for its coherence is a rigorous enforcement of determinism.\n                  <\/jats:p>","DOI":"10.1017\/s0956796818000242","type":"journal-article","created":{"date-parts":[[2019,2,8]],"date-time":"2019-02-08T06:27:26Z","timestamp":1549607246000},"source":"Crossref","is-referenced-by-count":6,"title":["COCHIS: Stable and coherent implicits"],"prefix":"10.1017","volume":"29","author":[{"given":"TOM","family":"SCHRIJVERS","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"BRUNO C.D.S.","family":"OLIVEIRA","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"PHILIP","family":"WADLER","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"KOAR","family":"MARNTIROSIAN","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2019,2,8]]},"reference":[{"key":"S0956796818000242_ref56","doi-asserted-by":"crossref","first-page":"185","DOI":"10.3233\/FI-1993-191-208","article-title":"On the undecidability of partial polymorphic type reconstruction","volume":"19","author":"Pfenning","year":"1993","journal-title":"Fundam. Inform"},{"key":"S0956796818000242_ref51","first-page":"54","volume-title":"Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL \u201996)","author":"Odersky","year":"1996"},{"key":"S0956796818000242_ref15","first-page":"143","volume-title":"ICFP","author":"Devriese","year":"2011"},{"key":"S0956796818000242_ref69","doi-asserted-by":"publisher","DOI":"10.1145\/2699407"},{"key":"S0956796818000242_ref71","first-page":"347","volume-title":"ECOOP","author":"Wehr","year":"2007"},{"key":"S0956796818000242_ref74","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2738008"},{"key":"S0956796818000242_ref8","unstructured":"Brady, E. (2015) Type classes in Idris [online]. Available at: https:\/\/groups.google.com\/forum\/#!topic\/idris-lang\/OQQ3oc6zBaM"},{"key":"S0956796818000242_ref55","first-page":"1","volume-title":"Haskell Workshop","author":"Peyton Jones","year":"1997"},{"key":"S0956796818000242_ref60","unstructured":"Rouvoet, A. (2016) Programs for Free: Towards the Formalization of Implicit Resolution in Scala. M.Phil. Thesis. TU Delft, the Netherlands."},{"key":"S0956796818000242_ref39","unstructured":"Marlow, S. (2012) Safe Haskell and instance coherence [online]. Available at: https:\/\/mail.haskell.org\/pipermail\/haskell-cafe\/2012-October\/103887.html"},{"key":"S0956796818000242_ref32","doi-asserted-by":"publisher","DOI":"10.1145\/1017472.1017481"},{"key":"S0956796818000242_ref34","doi-asserted-by":"publisher","DOI":"10.1145\/944705.944709"},{"key":"S0956796818000242_ref41","doi-asserted-by":"publisher","DOI":"10.1016\/0747-7171(92)90011-R"},{"key":"S0956796818000242_ref40","doi-asserted-by":"publisher","DOI":"10.1145\/357162.357169"},{"key":"S0956796818000242_ref62","volume-title":"ICFP","author":"Schrijvers","year":"2008"},{"key":"S0956796818000242_ref13","unstructured":"Chong, S. (2017) Lecture 2: Logical relations Part 2 [online]. Available at: https:\/\/www.seas.harvard.edu\/courses\/cs252\/2017fa\/lectures\/lec02-contextual-equiv.pdf"},{"key":"S0956796818000242_ref1","doi-asserted-by":"publisher","DOI":"10.1093\/logcom\/2.3.297"},{"key":"S0956796818000242_ref28","volume-title":"Qualified Types: Theory and Practice","author":"Jones","year":"1995"},{"key":"S0956796818000242_ref54","doi-asserted-by":"crossref","unstructured":"Oliveira, B. C. d. S. , Schrijvers, T. , Choi, W. , Lee, W. & Yi, K. (2012) The implicit calculus: A new foundation for generic programming. In PLDI \u201912. New York: ACM.","DOI":"10.1145\/2254064.2254070"},{"key":"S0956796818000242_ref23","doi-asserted-by":"publisher","DOI":"10.1145\/2034773.2034798"},{"key":"S0956796818000242_ref17","doi-asserted-by":"crossref","first-page":"63","DOI":"10.1145\/1190216.1190229","volume-title":"POPL","author":"Dreyer","year":"2007"},{"key":"S0956796818000242_ref35","doi-asserted-by":"publisher","DOI":"10.1145\/1411204.1411245"},{"key":"S0956796818000242_ref3","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9781139032636"},{"key":"S0956796818000242_ref18","unstructured":"Dunfield, J. & Krishnaswami, N. R. (2013) Complete and easy bidirectional typechecking for higherrank polymorphism. In ACM SIGPLAN International Conference on Functional Programming, ICFP\u201913, Morrisett, G. & Uustalu, T. (eds), Boston, MA: ACM, pp. 429\u2013442."},{"key":"S0956796818000242_ref12","first-page":"1","volume-title":"POPL","author":"Chakravarty","year":"2005"},{"key":"S0956796818000242_ref16","unstructured":"Dijkstra, A. & Swierstra, S. D. (2005) Making Implicit Parameters Explicit. Tech. rept. Utrecht University."},{"key":"S0956796818000242_ref30","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796806006034"},{"key":"S0956796818000242_ref6","doi-asserted-by":"publisher","DOI":"10.1145\/3122955.3122967"},{"key":"S0956796818000242_ref4","first-page":"1","article-title":"Logical relations for coherence of effect subtyping","volume":"14","author":"Biernacki","year":"2018","journal-title":"Log. Methods Comput. Sci"},{"key":"S0956796818000242_ref33","unstructured":"Kmett, E. (2015) Type classes vs. the world [online]. Available at: https:\/\/www.youtube.com\/watch?v=hIZxTQP1ifo"},{"key":"S0956796818000242_ref42","doi-asserted-by":"publisher","DOI":"10.1016\/0168-0072(91)90068-W"},{"key":"S0956796818000242_ref36","doi-asserted-by":"publisher","DOI":"10.1145\/325694.325708"},{"key":"S0956796818000242_ref72","volume-title":"Proceedings ML Family\/OCaml Users and Developers Workshops","author":"White","year":"2014"},{"key":"S0956796818000242_ref2","volume-title":"The Lambda Calculus: Its Syntax and Semantics, volume 103 of Studies in Logic and the Foundations of Mathematics","author":"Barendregt","year":"1981"},{"key":"S0956796818000242_ref7","doi-asserted-by":"crossref","unstructured":"Bottu, G.-J. & Simon, P. J. (2018) Quantified constraints \u2013 proposals [online]. Available at: https:\/\/github.com\/Gertjan423\/ghc-proposals\/blob\/quantified-constraints\/proposals\/0000-quantified-constraints.rst#overlap","DOI":"10.1145\/3122955.3122967"},{"key":"S0956796818000242_ref9","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(91)90055-7"},{"key":"S0956796818000242_ref59","unstructured":"rHaskell. (2006) The constraint trick for instances [online]. Available at: https:\/\/www.reddit.com\/r\/haskell\/comments\/3afi3t\/the_constraint_trick_for_instances\/cscb33j\/?st=jjcz7zeh&sh=1e5f3c8b"},{"key":"S0956796818000242_ref10","first-page":"37","volume-title":"FLOPS","author":"Camar\u00e3o","year":"1999"},{"key":"S0956796818000242_ref14","first-page":"207","volume-title":"POPL","author":"Damas","year":"1982"},{"key":"S0956796818000242_ref19","first-page":"671","volume-title":"POPL","author":"Eisenberg","year":"2014"},{"key":"S0956796818000242_ref22","unstructured":"GHC. (2017b) Quantified constraints \u2013 GHC [online]. Available at https:\/\/ghc.haskell.org\/trac\/ghc\/wiki\/QuantifiedConstraints"},{"key":"S0956796818000242_ref25","first-page":"29","article-title":"The principal type-scheme of an object in combinatory logic","volume":"146","author":"Hindley","year":"1969","journal-title":"Trans. Am. Math. Soc"},{"key":"S0956796818000242_ref26","unstructured":"Hulley, B. (2009) A show-stopping problem for modular type classes? [online]. Available at: http:\/\/lists.seas.upenn.edu\/pipermail\/types-list\/2009\/001405.html"},{"key":"S0956796818000242_ref27","first-page":"287","volume-title":"Proceedings of the 4th European Symposium on Programming (ESOP \u201992)","author":"Jones","year":"1992"},{"key":"S0956796818000242_ref29","doi-asserted-by":"crossref","first-page":"160","DOI":"10.1145\/224164.224198","volume-title":"Proceedings of the Seventh International Conference on Functional Programming Languages and Computer Architecture (FPCA \u201995)","author":"Jones","year":"1995"},{"key":"S0956796818000242_ref31","volume-title":"Preliminary Proceedings of the 2001 ACM SIGPLAN Haskell Workshop (HW\u20192001)","author":"Kahl","year":"2001"},{"key":"S0956796818000242_ref38","doi-asserted-by":"publisher","DOI":"10.1145\/357084.357090"},{"key":"S0956796818000242_ref43","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(78)90014-4"},{"key":"S0956796818000242_ref44","doi-asserted-by":"crossref","first-page":"375","DOI":"10.1145\/1863543.1863596","volume-title":"ICFP","author":"Morris","year":"2010"},{"key":"S0956796818000242_ref45","unstructured":"Morris, J. H. , Jr. (1969) Lambda-calculus Models of Programming Languages. Ph.D. thesis, Sloan School of Management."},{"key":"S0956796818000242_ref46","unstructured":"Mozilla Research , Team. (2017) The rust programming language [online]. Available at: https:\/\/www.rust-lang.org\/en-US\/"},{"key":"S0956796818000242_ref47","first-page":"230","volume-title":"Proceedings of the 6th International Conference on Advanced Functional Programming (AFP\u201908)","author":"Norell","year":"2008"},{"key":"S0956796818000242_ref20","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796806006198"},{"key":"S0956796818000242_ref48","unstructured":"nponeccop. (2012) Breaking data.set integrity without generalizednewtypederiving [online]. Available at: https:\/\/stackoverflow.com\/questions\/12735274\/breaking-data-set-integrity-withoutgeneralizednewtypederiving"},{"key":"S0956796818000242_ref57","volume-title":"Types and Programming Languages","author":"Pierce","year":"2002"},{"key":"S0956796818000242_ref49","unstructured":"Odersky, M. (2010) The Scala Language Specification, version 2.8."},{"key":"S0956796818000242_ref50","doi-asserted-by":"publisher","DOI":"10.1145\/3158130"},{"key":"S0956796818000242_ref52","unstructured":"oleg. (2006) Typeclass vs. prolog programming [online]. Available at: https:\/\/mail.haskell.org\/pipermail\/haskell-cafe\/2006-September\/018500.html"},{"key":"S0956796818000242_ref53","doi-asserted-by":"publisher","DOI":"10.1145\/1869459.1869489"},{"key":"S0956796818000242_ref24","doi-asserted-by":"crossref","first-page":"291","DOI":"10.1145\/1167473.1167499","volume-title":"OOPSLA","author":"Gregor","year":"2006"},{"key":"S0956796818000242_ref58","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-54415-1_70"},{"key":"S0956796818000242_ref21","unstructured":"GHC. (2017a) Ghc users guide: Overlapping instances [online]. Available at: https:\/\/downloads.haskell.org\/~ghc\/latest\/docs\/html\/users_guide\/glasgow_exts.html#overlapping-instances"},{"key":"S0956796818000242_ref61","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-45070-2_12"},{"key":"S0956796818000242_ref37","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2009.07.041"},{"key":"S0956796818000242_ref63","doi-asserted-by":"crossref","unstructured":"Siek, J. G. (2011) The C++0x \u201cConcepts\u201d\u02d9I Effort [online]. Available at: http:\/\/ecee.colorado.edu\/~siek\/concepts_effort.pdf","DOI":"10.1007\/978-3-642-32202-0_4"},{"key":"S0956796818000242_ref64","first-page":"73","volume-title":"PLDI","author":"Siek","year":"2005"},{"key":"S0956796818000242_ref65","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-71067-7_23"},{"key":"S0956796818000242_ref66","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796806006137"},{"key":"S0956796818000242_ref67","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796811000098"},{"key":"S0956796818000242_ref68","doi-asserted-by":"publisher","DOI":"10.1145\/1411204.1411246"},{"key":"S0956796818000242_ref70","first-page":"60","volume-title":"POPL","author":"Wadler","year":"1989"},{"key":"S0956796818000242_ref73","unstructured":"Zhang, E. (2014) Type classes: Confluence, coherence and global uniqueness [online]. Available at: http:\/\/blog.ezyang.com\/2014\/07\/type-classes-confluence-coherence-global-\/uniqueness\/"},{"key":"S0956796818000242_ref5","doi-asserted-by":"publisher","DOI":"10.1109\/SFCS.1985.44"},{"key":"S0956796818000242_ref11","first-page":"241","volume-title":"ICFP","author":"Chakravarty","year":"2005"}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796818000242","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,11,24]],"date-time":"2026-11-24T22:07:14Z","timestamp":1795558034000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796818000242\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019]]},"references-count":74,"alternative-id":["S0956796818000242"],"URL":"https:\/\/doi.org\/10.1017\/s0956796818000242","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[2019]]},"article-number":"e3"}}