Follow the default value in Network.HTTP.Conduit.Manager regardless of its meaning.
Follow the default value in Network.HTTP.Conduit.Manager regardless of its meaning.

The obvious and expected timeout behaviour is:

timeout def Nothing = def
timeout _   x       = mfilter (> 0) x

especially:
timeout {- default value -}(Just 0) {- do not override in config_file -}Nothing
shall evaluate to (Just 0), even if it do not make sense.

The same behaviour could be achieved by:
maybe def (find (> 0) . replicate 1) opt
or:
maybe def (listToMaybe . filter (> 0) . replicate 1) opt
, but require Data.List or Data.Maybe to be imported respectively.

mietek/mighttpd2,kazu-yamamoto/mighttpd2