Closed erikd closed 1 year ago
Thank you for opening this issue.
Yes, this part of the code is old and I never really took the time to design a solution.
As you said, in theory, that's basically impossible, but software engineering is full of realized impossible stories.
I'm open to suggestion, otherwise I'll try to fix that.
Even just a wild card pattern match like:
| isNegativeZero f =
case reprFractional fmt precision (abs f) of
FractionalRepr _ aa bb cc -> FractionalRepr Negative aa bb cc
other -> error $ "reprFractional (isNegativeZero f): The impossible happened : " ++ show other
would be preferable as it satisfies the compiler and if the impossible does actually happen gives a better error message than the normal incomplete pattern match exception.
Compiling git
HEAD
I get:Even if these extra options are basically impossible, the compiler can't prove that so the dev has to satisfy the compiler.