X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fghc%2FPrelMaybe.lhs;fp=ghc%2Flib%2Fghc%2FPrelMaybe.lhs;h=0000000000000000000000000000000000000000;hb=28139aea50376444d56f43f0914291348a51a7e7;hp=974e5de87274796642d7cfd048fb6689ccbb39e1;hpb=98a1ebecb6d22d793b1d9f8e1d24ecbb5a2d130f;p=ghc-hetmet.git diff --git a/ghc/lib/ghc/PrelMaybe.lhs b/ghc/lib/ghc/PrelMaybe.lhs deleted file mode 100644 index 974e5de..0000000 --- a/ghc/lib/ghc/PrelMaybe.lhs +++ /dev/null @@ -1,44 +0,0 @@ -% -% (c) The GRASP/AQUA Project, Glasgow University, 1992-1996 -% -\section[PrelMaybe]{Module @PrelMaybe@} - -The @Maybe@ type. - -\begin{code} -{-# OPTIONS -fno-implicit-prelude #-} - -module PrelMaybe where - -import PrelBase - -data Maybe a = Nothing | Just a deriving (Eq, Ord, Show {- Read -}) - -maybe :: b -> (a -> b) -> Maybe a -> b -maybe n f Nothing = n -maybe n f (Just x) = f x - -instance Functor Maybe where - map f Nothing = Nothing - map f (Just a) = Just (f a) - -instance Monad Maybe where - (Just x) >>= k = k x - Nothing >>= k = Nothing - - (Just x) >> k = k - Nothing >> k = Nothing - - return = Just - -instance MonadZero Maybe where - zero = Nothing - -instance MonadPlus Maybe where - Nothing ++ ys = ys - xs ++ ys = xs -\end{code} - - - -