title: Insert list of values into database with persistent
body: <p>Assuming I have this code (simplified from <a href="http://www.yesodweb.com/book/persistent" rel="nofollow">"Synopsis"</a>)</p>
  
  <pre><code>{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, OverloadedStrings #-}
  {-# LANGUAGE GADTs, FlexibleContexts #-}
  import Database.Persist
  import Database.Persist.Sqlite
  import Database.Persist.TH
  import Control.Monad.IO.Class (liftIO)
  import Control.Monad.Trans.Resource (runResourceT)
  
  share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persist|
  Person
    name String
  |]
  
  main :: IO ()
  main = runResourceT $ withSqliteConn ":memory:" $ runSqlConn $ do
    runMigration migrateAll
  
    johnID &lt;- insert $ Person "John Doe"
    janeID &lt;- insert $ Person "Jane Doe"
  
    liftIO $ print johnID
    liftIO $ print janeID
  
    return ()
  
  input = [Person "John Doe", Person "Jane Doe"]
  </code></pre>
  
  <p>How would I insert the list <code>input</code> and in turn receive a list of IDs?</p>