> I don't know if this is only really a problem if you were trying to use Haskell as a theorem prover.
Yes, it makes it impossible to use Haskell as anything more than a toy as far as theorem provers go. But that's OK because Haskell is not a theorem prover, it is a programming language!
Re:Bottom Type in F#
by dan-robertson on Wednesday September 23, 2020 @05:07AM
(#24564736)
You also have
error "foo" :: Void
Ultimately the issue is that Haskell programs are not guaranteed to terminate. You could write a similar function in F# too. Most (all?) theorem provers require that all functions probably terminate.Isn't this the premise of the Fast And Loose Reasoning Is Morally Correct paper, which argues that it's fine to ignore bottom when discussing program semantics? Or did I misunderstand that paper dramatically?
This may come across as pedantic, but your example only defines a variable with the bottom type. You never actually "construct an inhabitant" because the construction itself is nonterminating. This is actually, in my experience, one of the more common uses for the bottom type - it can mark functions that never return (the "exit" function, for example, or something that loops infinitely, or something that raises an exception).
[0]: https://gciruelos.com/propositions-as-types.html [1]: https://frenchy64.github.io/2018/04/07/unsoundness-in-untype...
EDIT: Just found this [2] which describes the above problem in type theory language.
[2]: https://en.wikipedia.org/wiki/System_U#Girard's_paradox