ADT Simple example of Abstract Data Types in Python. In Haskell we would write data Result = OK Int | Failure String In Python we can do Result = Union[OK, Failure] where OK and Failure are frozen dataclasses.