A bidirectional typechecking puzzle
Summary
The article analyzes Grace language's bidirectional typechecking, showing how list type inference and elaboration can lead to runtime bugs. It explains the root cause and how introducing a most-specific supertype fixes real-world JSON processing and improves type correctness.