There is much said about 'nondeterminism' in Haskell: The list monad and the Amb
monad call themselves nondeterministic.
But these functions just model nondeterminism - they (deterministically) generate all possible outcomes.
How would one write a truly nondeterministic choice in Haskell?
By this I mean a function of type
nondeterministicChoice :: a -> a -> IO a
where the compiler is unconstrained in whether to return the first or second argument (using the same logic it uses, for example, to choose whether to recalculate or memoize a thunk). Especially interesting would be if the resulting a
could be lazy.