This is not possible with standard Haskell, but can be done with an unsafe trick implemented by the lub library by Conal Elliott.
Basically, you write two functions:
orL True _ = True orL False x = x orR = flip orL
and then you can define or ab as lub (minimum upper bound relative to the order of definition) orL ab and orR ab .
Quickly, he starts both calculations in parallel and selects the first that succeeds, killing the other.
Despite the fact that it works as you suggested, it has important disadvantages. First of all, lub is safe only if its arguments are consistent (equal if only the bottom). If you take lub True False , the result will be non-deterministic, which will violate cleanliness! Secondly, performance overheads when performing both calculations in parallel can become dominant in some conditions (try to calculate foldr or False large list, for example!).
Rotorsor
source share