Re:An epic treatise on error models for systems programming ...
by marcosdumay on Saturday March 08, 2025 @12:53PM
(#43301989)
data A = A
data B = B
data X = XA A | XB B
data Y = YA A | YB B
f :: X -> () f = undefined
let r = f (undefined :: Y)
There's absolutely no way to write this so it compiles. In fact, there isn't even a way to define the composed types so that they only express a sum, you have to add extra baggage.
Also