Conversation

This is part of a compilation process where I want to preserve most of the types in my target language, and it's ok if not everything can be translated initially. I'll be converting things like type level case expressions to tagged unions for example.
1
2
"ok if not everything can be translated initially" – that is to say, we're ok if the elaboration process results in errors if the target language cannot match the expressiveness of the source language.
1
Papers recommended to me on #dependent: • “Extracting Fω's Programs from Proofs in the Calculus of Constructions” by Paulin-Mohring • “Foundations of Dependent Interoperability” by Dagand et al. • “Type-Theory In Color” by Bernardy and Moulin More suggestions welcome though!
2
6
I guess part of the challenge is that my target language, Rust, might be able to express some of the dependent stuff, and sometimes this is important for performance - eg. if we know the exact length of a list, we could translate it to a fixed length array. 🤔
3
2
Wow, from an initial pass the singleton types paper by Monnier and Haguenauer is looking really close to what I've been attempting to do right now! I need to read it more closely to be sure, but thanks so much, I really appreciate it! 🤩
1
2
I guess an added complication might be that I'm starting out with a core language more like MLTT, where I mix terms, types, and universes together. I'm guessing I'll need to have another pass to get it to look like the CC source language used in this paper?
Image
Image
Image
1
2