Bump versions and dependencies
[darcs-mirrors/vector.git] / Data / Vector / Fusion / Stream / Monadic / Safe.hs
1 #if __GLASGOW_HASKELL__ >= 701
2 {-# LANGUAGE Trustworthy #-}
3 #endif
4
5 -- |
6 -- Module : Data.Vector.Fusion.Stream.Monadic.Safe
7 -- Copyright : (c) Roman Leshchinskiy 2008-2010
8 -- License : BSD-style
9 --
10 -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
11 -- Stability : experimental
12 -- Portability : non-portable
13 --
14 -- Safe interface to "Data.Vector.Fusion.Stream.Monadic"
15 --
16
17 module Data.Vector.Fusion.Stream.Monadic.Safe (
18 Stream(..), Step(..),
19
20 -- * Size hints
21 size, sized,
22
23 -- * Length
24 length, null,
25
26 -- * Construction
27 empty, singleton, cons, snoc, replicate, replicateM, generate, generateM, (++),
28
29 -- * Accessing elements
30 head, last, (!!),
31
32 -- * Substreams
33 slice, init, tail, take, drop,
34
35 -- * Mapping
36 map, mapM, mapM_, trans, unbox, concatMap, flatten,
37
38 -- * Zipping
39 indexed, indexedR, zipWithM_,
40 zipWithM, zipWith3M, zipWith4M, zipWith5M, zipWith6M,
41 zipWith, zipWith3, zipWith4, zipWith5, zipWith6,
42 zip, zip3, zip4, zip5, zip6,
43
44 -- * Filtering
45 filter, filterM, takeWhile, takeWhileM, dropWhile, dropWhileM,
46
47 -- * Searching
48 elem, notElem, find, findM, findIndex, findIndexM,
49
50 -- * Folding
51 foldl, foldlM, foldl1, foldl1M, foldM, fold1M,
52 foldl', foldlM', foldl1', foldl1M', foldM', fold1M',
53 foldr, foldrM, foldr1, foldr1M,
54
55 -- * Specialised folds
56 and, or, concatMapM,
57
58 -- * Unfolding
59 unfoldr, unfoldrM,
60 unfoldrN, unfoldrNM,
61 iterateN, iterateNM,
62
63 -- * Scans
64 prescanl, prescanlM, prescanl', prescanlM',
65 postscanl, postscanlM, postscanl', postscanlM',
66 scanl, scanlM, scanl', scanlM',
67 scanl1, scanl1M, scanl1', scanl1M',
68
69 -- * Enumerations
70 enumFromStepN, enumFromTo, enumFromThenTo,
71
72 -- * Conversions
73 toList, fromList, fromListN
74 ) where
75
76 import Data.Vector.Fusion.Stream.Monadic
77 import Prelude ()
78