00ac9c2f613cdb5cddacc375783188eec07abe96
[darcs-mirrors/vector.git] / Data / Vector / Fusion / Stream / Safe.hs
1 #if __GLASGOW_HASKELL__ >= 701
2 {-# LANGUAGE Trustworthy #-}
3 #endif
4
5 -- |
6 -- Module : Data.Vector.Fusion.Stream.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"
15 --
16
17 module Data.Vector.Fusion.Stream.Safe (
18 -- * Types
19 Step(..), Stream, MStream,
20
21 -- * In-place markers
22 inplace,
23
24 -- * Size hints
25 size, sized,
26
27 -- * Length information
28 length, null,
29
30 -- * Construction
31 empty, singleton, cons, snoc, replicate, generate, (++),
32
33 -- * Accessing individual elements
34 head, last, (!!),
35
36 -- * Substreams
37 slice, init, tail, take, drop,
38
39 -- * Mapping
40 map, concatMap, flatten, unbox,
41
42 -- * Zipping
43 indexed, indexedR,
44 zipWith, zipWith3, zipWith4, zipWith5, zipWith6,
45 zip, zip3, zip4, zip5, zip6,
46
47 -- * Filtering
48 filter, takeWhile, dropWhile,
49
50 -- * Searching
51 elem, notElem, find, findIndex,
52
53 -- * Folding
54 foldl, foldl1, foldl', foldl1', foldr, foldr1,
55
56 -- * Specialised folds
57 and, or,
58
59 -- * Unfolding
60 unfoldr, unfoldrN, iterateN,
61
62 -- * Scans
63 prescanl, prescanl',
64 postscanl, postscanl',
65 scanl, scanl',
66 scanl1, scanl1',
67
68 -- * Enumerations
69 enumFromStepN, enumFromTo, enumFromThenTo,
70
71 -- * Conversions
72 toList, fromList, fromListN, liftStream,
73
74 -- * Monadic combinators
75 mapM, mapM_, zipWithM, zipWithM_, filterM, foldM, fold1M, foldM', fold1M',
76
77 eq, cmp
78 ) where
79
80 import Data.Vector.Fusion.Stream
81 import Prelude ()
82