Module Relude_Void
type t=
;|Void(t)Void.tis a type for which it is impossible to construct a value. This may sound like a strange concept, but it can be very valuable for indicating at compile time that certain case is unraeachable.For example, the type
result('a, Void.t)is still aresult, and you can still do all of the normal result things to it, but you can know for a fact that it can't be anError, because there would be no way to construct a valid error payload to satisfy theVoid.ttype.
let absurd: t => 'a;Void.absurdcan be used when you need to provide a function fromVoid.tto any other type. Because no value of void can be constructed, this function will never actually be called.