4 ms·
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 t
by marcosdumay 2y ago
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.