Re:Linear types can change the world (1990) [pdf]
by chriswarbo on Wednesday January 10, 2018 @12:37PM
(#16116999)
> In your f2 example, could you ever use/inspect the preProof argument?
Yes you could, but if your return value relies on details of the proof (e.g. branching on different cases) then it may no longer be erasable. Unless those parts of the return value can also be erased... it gets tricky :)
You're right to mention Idris, since it treats proofs in this way. In languages like ATS, there is a clear separation between erasable "proof-like" things and runtime "value-like" things, which makes things more predictable, but can lead to duplication.
I should probably learn Idris already, that would probably clear up these questions. :)