Type Inference for Multi-Parameter Type Classes
نویسندگان
چکیده
We observe that the combination of multi-parameter type classes with existential types and type annotations leads to a loss of principal types. As a consequence type inference in implementations such as GHC is incomplete. This may be a surprising fact for users of these standard features. We conduct a concise investigation of the problem and are able to precisely explain why we lose principality and completeness of inference. As remedy we propose several novel inference methods to retain completeness and principality.
منابع مشابه
Principal Type Inference for GHC-Style Multi-parameter Type Classes
We observe that the combination of multi-parameter type classes with existential types and type annotations leads to a loss of principal types and undecidability of type inference. This may be a surprising fact for users of these popular features. We conduct a concise investigation of the problem and are able to give a type inference procedure which, if successful, computes principal types unde...
متن کاملType Classes and Constraint Handling Rules
Type classes are an elegant extension to traditional, Hindley-Milner based typing systems. They are used in modern, typed languages such as Haskell to support controlled overloading of symbols. Haskell 98 supports only single-parameter and constructor type classes. Other extensions such as multi-parameter type classes are highly desired but are still not officially supported by Haskell. Subtle ...
متن کاملInference for the Type-II Generalized Logistic Distribution with Progressive Hybrid Censoring
This article presents the analysis of the Type-II hybrid progressively censored data when the lifetime distributions of the items follow Type-II generalized logistic distribution. Maximum likelihood estimators (MLEs) are investigated for estimating the location and scale parameters. It is observed that the MLEs can not be obtained in explicit forms. We provide the approximate maximum likelihood...
متن کاملStatistical Inference for the Lomax Distribution under Progressively Type-II Censoring with Binomial Removal
This paper considers parameter estimations in Lomax distribution under progressive type-II censoring with random removals, assuming that the number of units removed at each failure time has a binomial distribution. The maximum likelihood estimators (MLEs) are derived using the expectation-maximization (EM) algorithm. The Bayes estimates of the parameters are obtained using both the squared erro...
متن کاملA Flexible Link Radar Control Based on Type-2 Fuzzy Systems
An adaptive neuro fuzzy inference system based on interval Gaussian type-2 fuzzy sets in the antecedent part and Gaussian type-1 fuzzy sets as coefficients of linear combination of input variables in the consequent part is presented in this paper. The capability of the proposed method (we named ANFIS2) for function approximation and dynamical system identification is remarkable. The structure o...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2005