Hayoo/Hoogle not matching monomorphic/less polymorphic signatures with polymorphic ones

六月ゝ 毕业季﹏ 提交于 2020-05-11 05:11:46

问题


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')

to

a b c    -> a b' c'    ->   a (b, b') (c, c')

which happens to be the type of Control.Arrow.***:

(***) :: 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?


回答1:


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.



来源:https://stackoverflow.com/questions/33234878/hayoo-hoogle-not-matching-monomorphic-less-polymorphic-signatures-with-polymorph

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!