4 ms·
AFAIUI: "Void -> a" means that the function cannot be called, because there no way to conjure a Void value. In Haskell, you can do it by (ab)using 'undefined',
by Quekid5 8y ago
AFAIUI:
"Void -> a" means that the function cannot be called, because there no way to conjure a Void value. In Haskell, you can do it by (ab)using 'undefined', but that's kind of cheating. However, if you're using Idris with totality checking, I don't think you'll actually get any code calling such a function compile.
The "a -> Void" means that the function can never return.
- matt-noonan 8y ago`Void -> a` is inhabited by the slightly weird empty-case construct in (GHC) Haskell: `\x -> case x of {}` has type `Void -> a`
- uryga 8y agoAlso known as the `absurd` function IIRC?