File: Maybe.hs

package info (click to toggle)
haskell98-report 20030706-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,888 kB
  • ctags: 80
  • sloc: haskell: 3,810; makefile: 336; sh: 4
file content (17 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Maybe(
    isJust, isNothing,
    fromJust, fromMaybe, listToMaybe, maybeToList,
    catMaybes, mapMaybe,

    -- ...and what the Prelude exports
    Maybe(Nothing, Just),
    maybe
  ) where

isJust, isNothing    :: Maybe a -> Bool
fromJust             :: Maybe a -> a
fromMaybe            :: a -> Maybe a -> a
listToMaybe          :: [a] -> Maybe a
maybeToList          :: Maybe a -> [a]
catMaybes            :: [Maybe a] -> [a]
mapMaybe             :: (a -> Maybe b) -> [a] -> [b]