void package:cabal-install-solver

void value discards or ignores the result of evaluation, such as the return value of an IO action.

Examples

Replace the contents of a Maybe Int with unit:
>>> void Nothing
Nothing

>>> void (Just 3)
Just ()
Replace the contents of an Either Int Int with unit, resulting in an Either Int ():
>>> void (Left 8675309)
Left 8675309

>>> void (Right 8675309)
Right ()
Replace every element of a list with unit:
>>> void [1,2,3]
[(),(),()]
Replace the second element of a pair with unit:
>>> void (1,2)
(1,())
Discard the result of an IO action:
>>> mapM print [1,2]
1
2
[(),()]

>>> void $ mapM print [1,2]
1
2
Uninhabited data type
Avoid reinstalls. This is a tricky strategy. If a package version is installed already and the same version is available from a repo, the repo version will never be chosen. This would result in a reinstall (either destructively, or potentially, shadowing). The old instance won't be visible or even present anymore, but other packages might have depended on it. TODO: It would be better to actually check the reverse dependencies of installed packages. If they're not depended on, then reinstalling should be fine. Even if they are, perhaps this should just result in trying to reinstall those other packages as well. However, doing this all neatly in one pass would require to change the builder, or at least to change the goal set after building.