Which is awfully similar to Haskell's Maybe. Ignoring boilerplate and comments, the entire module is just [0]:
data Maybe a = Nothing | Just a
deriving ( Eq, Ord )
And the deriving line isn't really nessasary.The Monad module is larger and contains code specific to Maybe [1]:
instance Monad Maybe where
(Just x) >>= k = k x
Nothing >>= _ = Nothing
(>>) = (*>)
fail _ = Nothing
(Only the first 2 lines are needed. The 3rd is an optimization, the 4th is a historical wart that will be removed in future versions (moved to MonadFail)[0] https://hackage.haskell.org/package/base-4.12.0.0/docs/src/G...
[1] https://hackage.haskell.org/package/base-4.12.0.0/docs/src/G...