summaryrefslogtreecommitdiff
path: root/progs/lib/hbc/Maybe.hs
blob: f0ada701f6a31ce5c84855a9ec62fe89a0515b62 (about) (plain)
1
2
3
4
5
6
module Maybe(Maybe(..), thenM) where
-- Maybe together with Just and thenM forms a monad, but is more
-- by accident than by design.
data Maybe a = Nothing | Just a	deriving (Eq, Ord, Text, Binary)
Nothing `thenM` _ = Nothing
Just a  `thenM` f = f a