Rank2Type有利于RankNTypes吗? [英] Are there any advantages of using Rank2Types in favor of RankNTypes?

查看:217
本文介绍了Rank2Type有利于RankNTypes吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,一种可判定的类型检查算法仅存在于rank-2类型中。 GHC是否在某种程度上使用了这个事实,它是否有任何实际意义?

是否还有rank-2类型的主要类型概念和类型推断算法?如果是的话,GHC是否使用它?



Rank-2类型比rank- n 类型有其他优势吗?

解决方案

Rank2Types 同义词用于 RankNTypes 。所以现在没有rank-2优于rank-n的优势。


As far as I know, a decidable type checking algorithm exists (only) for rank-2 types. Does GHC use somehow this fact, and does it have any practical implications?

Is there also a notion of principal types for rank-2 types, and a type inference algorithm? If yes, does GHC use it?

Are there any other advantages of rank-2 types over rank-n types?

解决方案

Rank2Types is a synonym for RankNTypes. So right now there are no advantages of rank-2 over rank-n.

这篇关于Rank2Type有利于RankNTypes吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆