diff --git a/gitignore.cabal b/gitignore.cabal
--- a/gitignore.cabal
+++ b/gitignore.cabal
@@ -1,5 +1,5 @@
 name:                gitignore
-version:             1.0.1
+version:             1.1
 synopsis:            Apply GitHub .gitignore templates to already existing repositories.
 description:         Apply GitHub .gitignore templates to already existing repositories.
 homepage:            https://github.com/relrod/gitignore
@@ -18,7 +18,7 @@
 
 executable gitignore
   main-is:              gitignore.hs
-  build-depends:        aeson >= 0.8 && < 0.9,
+  build-depends:        aeson >= 0.8 && < 1,
                         base >= 4 && < 5,
                         base64-bytestring >= 1 && < 2,
                         bytestring >= 0.10 && < 1,
diff --git a/gitignore.hs b/gitignore.hs
--- a/gitignore.hs
+++ b/gitignore.hs
@@ -3,6 +3,7 @@
 module Main where
 
 import Control.Applicative
+import Control.Monad (forM_)
 import Data.Aeson
 import Data.Char (toLower)
 import Data.List (dropWhileEnd, find, sort)
@@ -78,12 +79,14 @@
             filter ((/= "") . Main.path) $
             fmap (\x -> x { Main.path = dropWhileEnd (/= '.') (Main.path x) }) x
       case s of
-        "list" ->
-          mapM_ putStrLn $ sort $ fmap path ignores
-        _ -> do
-          let selected = find (\y -> fmap toLower (Main.path y) == s) ignores
-          case selected of
-            Nothing -> error "No such gitignore was found. Use 'list' for all possible gitignores."
-            Just f -> do
-              decoded <- getIgnoreFile $ url f
-              putStr $ C8.unpack decoded
+        "list" -> mapM_ putStrLn $ sort $ fmap path ignores
+        _ -> forM_ a (printIgnore ignores)
+
+printIgnore :: Foldable t => t GitIgnore -> [Char] -> IO ()
+printIgnore ignores s = do
+  let selected = find (\y -> fmap toLower (Main.path y) == s) ignores
+  case selected of
+    Nothing -> error "No such gitignore was found. Use 'list' for all possible gitignores."
+    Just f -> do
+        decoded <- getIgnoreFile $ url f
+        putStr $ C8.unpack decoded
