Hayoo/Hoogle不将单态/较少多态签名与多态签名匹配 [英] Hayoo/Hoogle not matching monomorphic/less polymorphic signatures with polymorphic ones
问题描述
例如,我试图了解是否有一个为什么Hoogle和Hayoo不匹配的根本原因
I'm trying to understand if there's a fundamental reason for why Hoogle and Hayoo aren't matching, for instance
(b -> c) -> (b' -> c') -> (b, b') -> (c, c')
到
a b c -> a b' c' -> a (b, b') (c, c')
恰好是-这可能只是尚未实现的事情,还是有某种根本性因素在阻止这种基于类型的搜索的实现?
— is this likely just something that's as-of-yet unimplemented, or is there something fundamental that is preventing this sort of type based search from ever being implemented?
推荐答案
使用Hoogle,似乎是->
的处理方式的结果. GitHub跟踪器中的问题#64 ,与我们在此处讨论的非常相似,包括尼尔·米切尔(Neil Mitchell)的评论:
With Hoogle, it seems to be a consequence of how ->
is handled. Issue #64 in the GitHub tracker, which is very similar to what we are discussing here, includes this comment by Neil Mitchell:
当前,我快速从参数中分离出结果类型.我想一种方法是找到
->
的实例,并预先生成替换有->
的版本.
Currently I quickly split out the result type from the arguments. I guess one approach would be to find instances for
->
and pregenerate a version with->
substituted in.
这篇关于Hayoo/Hoogle不将单态/较少多态签名与多态签名匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!