projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2005-02-15 08:09:43 by ross]
[ghc-base.git]
/
Data
/
Maybe.hs
diff --git
a/Data/Maybe.hs
b/Data/Maybe.hs
index
abb1c19
..
69dd75f
100644
(file)
--- a/
Data/Maybe.hs
+++ b/
Data/Maybe.hs
@@
-1,4
+1,4
@@
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS_GHC -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Maybe
-----------------------------------------------------------------------------
-- |
-- Module : Data.Maybe
@@
-6,7
+6,7
@@
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
--- Stability : experimental
+-- Stability : stable
-- Portability : portable
--
-- The Maybe type, and associated operations.
-- Portability : portable
--
-- The Maybe type, and associated operations.
@@
-128,7
+128,7
@@
listToMaybe :: [a] -> Maybe a
listToMaybe [] = Nothing
listToMaybe (a:_) = Just a
listToMaybe [] = Nothing
listToMaybe (a:_) = Just a
--- | The 'catMaybes' function takes a list of "Maybe's and returns
+-- | The 'catMaybes' function takes a list of 'Maybe's and returns
-- a list of all the 'Just' values.
catMaybes :: [Maybe a] -> [a]
catMaybes ls = [x | Just x <- ls]
-- a list of all the 'Just' values.
catMaybes :: [Maybe a] -> [a]
catMaybes ls = [x | Just x <- ls]