diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-09-29 07:15:27 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-09-29 07:15:27 +0200 |
commit | cc8958f3d6c86939982650f4b2a739e51f025028 (patch) | |
tree | f3f33bd4490287f5dba1d5a33c7e4cc828cf22a9 | |
parent | ad8aa805d3837062e91fc8f5391c07f228c5bb33 (diff) | |
download | XMonadContrib-cc8958f3d6c86939982650f4b2a739e51f025028.tar.gz XMonadContrib-cc8958f3d6c86939982650f4b2a739e51f025028.tar.xz XMonadContrib-cc8958f3d6c86939982650f4b2a739e51f025028.zip |
Give Invisible a definition for fail.
The default definition of fail calls error. This is very bad, as we rely on a
non-bottom result. We should consider moving to MonadZero, to be on the safe
side.
darcs-hash:20070929051527-a5988-bef59af98860ac34ef05cc4ff5e1580835367eaa.gz
Diffstat (limited to '')
-rw-r--r-- | Invisible.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Invisible.hs b/Invisible.hs index 5d040f7..8a5295c 100644 --- a/Invisible.hs +++ b/Invisible.hs @@ -33,6 +33,7 @@ instance Monad m => Show (Invisible m a) where instance (Functor m, Monad m) => Monad (Invisible m) where return a = I (return a) m >>= f = m >>= f + fail s = I (fail s) instance (Functor m, Monad m) => Functor (Invisible m) where fmap f (I x) = I (fmap f x) |