for sure. I have frequently considered writing my rules up in a datalog 😊
thing is, I tend to care enough about the precise structure and strategy for proof search that I don’t think I’d gain anything by that means for my typesystems’ real implementations.
Conversation
Oh yeah, definitely thinking more in terms of 'high level specifications for communication' rather than an actual implementation. I definitely care about the precise proof search strategy too, however.
2
1
That said, Mercury would be able to generate pretty efficient code for a bidirectional type checker defined using the modes above. I wouldn't want to use it for an implementation though - more because I'd want an actual implementation to do error recovery, and give nice errors.
1
1
It would be neat if you could somehow 'decorate' the high level spec with stuff to do with errors though - kind of like how ornaments work?
1
1
I know Ulf Norell's thesis on Agda defines a macro over the elaboration rules (in prose) that allows him to thread the metacontext through all the rules. Not sure if that is similar! But kind of reminds me a bit.
1
1
check out this wizardy 🤩

