🔄 Is "Complete and Easy Bidirectional Typechecking" the way to go if you want to implement a Haskell-like type system (type inference, parametric polymorphism, typeclasses, RankNTypes)?
Conversation
This Tweet is from a suspended account. Learn more
I'm pretty sure Complete and Easy combines the two, allowing you to leave off type annotations, but switching to bidirectional typing for higher rank stuff. Stuff like generalisation and type variable unification can definitely be combined with bidirectional typing!
1
This Tweet is from a suspended account. Learn more
Yeah, you'll want to add type variable unification in the mix, and genralization+instatiation on top of bidi typing in order to get the feel of Haskell. I'm pretty sure that's covered in Complete and Easy (been a while since I looked though).
Definitely agree that bidirectional typing on its own is not enough though! You need to add other stuff to the mix to get more usability. But it's more a ‘why not both?’ kind of thing, vs. a ‘this or that’ kind of thing.

