9

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?

Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
  • 2
    It matches if you use the prefix tuple constructor: `(,) b c -> (,) b' c' -> (,) (b, b') (c, c')`. – C. Quilley Oct 20 '15 at 11:15
  • 1
    @C.Quilley: hold on... `b -> c` is not at all the same as `(,) b c` — so what do you mean? Your signature is of a function that takes 2 pairs and combines those into a pair of pairs. – Erik Kaplun Oct 20 '15 at 12:01
  • 2
    ...and just for the record: even if what you meant was `((->) b c) -> ((->) b' c') -> ((->) (b, b') (c, c'))` — which is what I'm asking about — that still doesn't yield any results neither on Hayoo nor on Hoogle. – Erik Kaplun Oct 20 '15 at 12:06
  • Sorry, I completely misread your post. I'm now as mystified as you are. – C. Quilley Oct 20 '15 at 12:24

1 Answers1

4

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.

duplode
  • 33,731
  • 7
  • 79
  • 150