Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 593
Erik Kaplun Avatar asked Oct 20 '15 11:10

Erik Kaplun


1 Answers

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.

like image 116
duplode Avatar answered Oct 05 '22 03:10

duplode