3 ms·
I'd say that the type-checker in e.g. Haskell does already do a bit of the "parsing" here, in that it takes code with some type annotations, and returns (on suc
by rstarast 6y ago
I'd say that the type-checker in e.g. Haskell does already do a bit of the "parsing" here, in that it takes code with some type annotations, and returns (on success) that code with fully resolved types. I.e., type variables will be resolved, missing annotations inferred, etc.
That said, the idea of moving parts of the type-checking to the parsing stage is novel and interesting.
- nsajko 6y ago> That said, the idea of moving parts of the type-checking to the parsing stage is novel and interesting. It's exactly the opposite of novel, from the very beginnings of parsing theory its goal was to separate lexical, syntactic and semantic analysis. The benefits of the separation come as both better run-time performance and less code size and complexity.