Hey, here is a realty random question— have you ever looked into bilinear type inference (or trilinear)? Does it seem to you like there's anything useful-in-practice there?
Conversation
If I have, I've forgotten about it. Scholar and citeseer are also turning up blanks. Got a reference?
(I would not say that type inference in general is an area I'm any good at. I know just enough to grasp for canonical algorithms and design conservatively.)
1
(Did you mean bidirectional?)
1
2
Ah, so sorry, I meant bidirectional/tridirectional. And I have not found a paper that I feel really jumps out as "ah, *this* makes it make sense!" :(. it seems to be the pet project of a few people and I can't tell if it's ever been used in a large system
3
I... haven't ever heard of tridirectional. :)
The kind of confusing thing about "bidirectional typechecking" (slash "inference", which are also used kinda interchangeably) is that it's used to refer to two related but distinct things.
1
So "bidirectional typechecking" itself is a technique, a way of structuring a typechecker. But you can also go beyond it and add more stuff (like unification). And "bidi tc" is used to mean either "just that, and nothing more", or "a typechecker with that as the basic structure".
1
I'm afraid I can't point to any particular paper or blog post offhand that gave me an "aha" moment... it *has* been used in large systems, several of them, depending on your idea of "large". But IINM /a lot/ of modern typecheckers are structured this way.
2
Oh, bidirectional inference. Yes, I believe the canonical paper on this is arxiv.org/abs/1306.6032 with recent extension
2
1
Thanks / Thanks everyone who replied, sorry i was confused *_*
1
2
I liked this one as a good place to start: davidchristiansen.dk/tutorials/bidi - you can go more complex, but it's handy to know the foundation first! I also have a type checker in Elm here: github.com/brendanzab/elm



