From b28660f6df52c0da5995318765c37cec65f19225 Mon Sep 17 00:00:00 2001 From: michaelt Date: Tue, 11 Nov 2014 17:52:47 -0500 Subject: travis --- .travis.yml | 21 ++++++++++++++++++++- 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 @@ -language: haskell \ No newline at end of file +language: haskell + +before_install: + # Uncomment whenever hackage is down. + # - mkdir -p ~/.cabal && cp travis/config ~/.cabal/config && cabal update + + # Try installing some of the build-deps with apt-get for speed. + - travis/cabal-apt-install $mode + +install: + - cabal configure $mode + - cabal build + +notifications: + irc: + channels: + - "irc.freenode.org##piffle" + skip_join: true + template: + - "\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) -- | Apply a transformation to each 'Char' in the stream -- >>> let margaret = ["Margaret, are you grieving\nOver Golde","ngrove unleaving?":: Text] --- >>> TL.putStrLn $ toLazy $ each margaret >-> map Data.Char.toUpper +-- >>> TL.putStrLn . toLazy $ each margaret >-> map Data.Char.toUpper -- MARGARET, ARE YOU GRIEVING -- OVER GOLDENGROVE UNLEAVING? map :: (Monad m) => (Char -> Char) -> Pipe Text Text m r @@ -168,7 +168,7 @@ take :: (Monad m, Integral a) => a -> Pipe Text Text m () take n0 = go n0 where go n | n <= 0 = return () - | otherwise = do + | otherwise = do txt <- await let len = fromIntegral (T.length txt) if (len > n) -- cgit v1.2.3