diff options
-rw-r--r-- | .travis.yml | 21 | ||||
-rw-r--r-- | Pipes/Text.hs | 4 |
2 files changed, 22 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 6a21913..c099def 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -1 +1,20 @@ | |||
1 | language: haskell \ No newline at end of file | 1 | language: haskell |
2 | |||
3 | before_install: | ||
4 | # Uncomment whenever hackage is down. | ||
5 | # - mkdir -p ~/.cabal && cp travis/config ~/.cabal/config && cabal update | ||
6 | |||
7 | # Try installing some of the build-deps with apt-get for speed. | ||
8 | - travis/cabal-apt-install $mode | ||
9 | |||
10 | install: | ||
11 | - cabal configure $mode | ||
12 | - cabal build | ||
13 | |||
14 | notifications: | ||
15 | irc: | ||
16 | channels: | ||
17 | - "irc.freenode.org##piffle" | ||
18 | skip_join: true | ||
19 | template: | ||
20 | - "\x0313linear\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}" | ||
diff --git a/Pipes/Text.hs b/Pipes/Text.hs index 0f2e31d..f71f17f 100644 --- a/Pipes/Text.hs +++ b/Pipes/Text.hs | |||
@@ -148,7 +148,7 @@ a ^. lens = getConstant (lens Constant a) | |||
148 | -- | Apply a transformation to each 'Char' in the stream | 148 | -- | Apply a transformation to each 'Char' in the stream |
149 | 149 | ||
150 | -- >>> let margaret = ["Margaret, are you grieving\nOver Golde","ngrove unleaving?":: Text] | 150 | -- >>> let margaret = ["Margaret, are you grieving\nOver Golde","ngrove unleaving?":: Text] |
151 | -- >>> TL.putStrLn $ toLazy $ each margaret >-> map Data.Char.toUpper | 151 | -- >>> TL.putStrLn . toLazy $ each margaret >-> map Data.Char.toUpper |
152 | -- MARGARET, ARE YOU GRIEVING | 152 | -- MARGARET, ARE YOU GRIEVING |
153 | -- OVER GOLDENGROVE UNLEAVING? | 153 | -- OVER GOLDENGROVE UNLEAVING? |
154 | map :: (Monad m) => (Char -> Char) -> Pipe Text Text m r | 154 | map :: (Monad m) => (Char -> Char) -> Pipe Text Text m r |
@@ -168,7 +168,7 @@ take :: (Monad m, Integral a) => a -> Pipe Text Text m () | |||
168 | take n0 = go n0 where | 168 | take n0 = go n0 where |
169 | go n | 169 | go n |
170 | | n <= 0 = return () | 170 | | n <= 0 = return () |
171 | | otherwise = do | 171 | | otherwise = do |
172 | txt <- await | 172 | txt <- await |
173 | let len = fromIntegral (T.length txt) | 173 | let len = fromIntegral (T.length txt) |
174 | if (len > n) | 174 | if (len > n) |