-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS_GHC -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Maybe
-- 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.
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]