haskell - Why is there not a funtion `quit = fail ""` for MaybeT? -


looking @ source code of fail in maybet instance of monad:

instance (monad m) => monad (maybet m)     fail _ = maybet (return nothing) 

it's clear argument of fail not used. why isn't there cleaner function quit :: maybet m () saves typing fail "" everytime? or missing something?

that mzero is maybet's monadplus instance (except type more general 1 gave: maybet instance, have mzero :: monad m => maybet m a).


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

android - Go back to previous fragment -