Type-checking multi-parameter type classes

被引:0
|
作者
Duggan, Dominic [1 ]
Ophel, John [2 ]
机构
[1] Department of Computer Science, Stevens Institute of Technology, Castle Point on the Hudson, Hoboken, NJ 07030, United States
[2] Department of Computer Science and Computer Engineering, La Trobe University, Bundoora, Vic. 3083, Australia
关键词
Algorithms - Problem solving - Recursive functions - Vectors;
D O I
10.1017/s0956796801004233
中图分类号
学科分类号
摘要
Type classes are a novel combination of parametric polymorphism and constrained types. Although most implementations restrict type classes to be single-parameter, the generalization to multi-parameter type classes has gained increasing attention. A problem with multiparameter type classes is the increased possibilities they introduce for ambiguity in inferred types, impacting their usefulness in many practical situations. A new type-checking strategy, domain-driven unifying resolution, is identified as an approach to solve these problems. Domaindriven unifying resolution is simple, efficient, and practically useful. However, even with severe restrictions on instance definitions, it is not possible to guarantee that type-checking with unifying resolution terminates. This is in contrast with the naive generalization of single parameter resolution strategies. Domain-driven unifying resolution is guaranteed to terminate if the type class constraints are satisfiable; however satisfiability is undecidable even with severe restrictions on instance definitions. These results shed some light on ambiguity problems with multi-parameter type classes.
引用
收藏
页码:133 / 158
相关论文
共 50 条
  • [32] A Type-Checking Algorithm for Martin-Lof Type Theory with Subtyping Based on Normalisation by Evaluation
    Fridlender, Daniel
    Pagano, Miguel
    TYPED LAMBDA CALCULI AND APPLICATIONS, TLCA 2013, 2013, 7941 : 140 - 155
  • [33] Well-definedness and semantic type-checking for the nested relational calculus
    Van den Bussche, Jan
    Van Gucht, Dirk
    Vansummeren, Stijn
    THEORETICAL COMPUTER SCIENCE, 2007, 371 (03) : 183 - 199
  • [34] Experience Report: Type-checking Polymorphic Units for Astrophysics Research in Haskell
    Muranushi, Takayuki
    Eiscnberg, Richard A.
    ACM SIGPLAN NOTICES, 2014, 49 (12) : 31 - 38
  • [35] Incremental type-checking for free: using scope graphs to derive incremental type-checkers
    Zwaan A.
    Van Antwerpen H.
    Visser E.
    Proceedings of the ACM on Programming Languages, 2022, 6 (OOPSLA2): : 424 - 448
  • [36] Parallel Type-checking with Haskell using Saturating LVars and Stream Generators
    Newton, Ryan R.
    Agacan, Omer S.
    Fogg, Peter
    Tobin-Hochstadt, Sam
    ACM SIGPLAN NOTICES, 2016, 51 (08) : 61 - 72
  • [37] Noncommutative multi-parameter Wiener-Wintner type ergodic theorem
    Hong, Guixiang
    Sun, Mu
    JOURNAL OF FUNCTIONAL ANALYSIS, 2018, 275 (05) : 1100 - 1137
  • [38] ONE TYPE OF MULTI-PARAMETER NONLINEAR DIGITAL CONTROL-SYSTEMS
    HRIVNAK, J
    KYBERNETIKA, 1975, 11 (01) : 68 - 83
  • [39] Design of LC-type Passive Wireless Multi-parameter Sensor
    Zhang, Cong
    Huang, Jian-Qiu
    Huang, Qing-An
    2013 8TH ANNUAL IEEE INTERNATIONAL CONFERENCE ON NANO/MICRO ENGINEERED AND MOLECULAR SYSTEMS (IEEE NEMS 2013), 2013, : 256 - 259
  • [40] Simultaneous multi-parameter identification algorithm for clearance-type nonlinearity
    Hu, Bingbing
    Liu, Jie
    Liu, Shanhui
    Li, Bing
    Lei, Xiaofei
    MECHANICAL SYSTEMS AND SIGNAL PROCESSING, 2020, 139