-- and with those we can do this:

connectInfo :: String -> IO ConnectInfo
connectInfo dbname = ConnectInfo <$> dbmsServer dbname
                          <*> (fromIntegral <$> dbPort dbname)
                          <*> dbUserName dbname <*> dbPassword dbname
                          <*> dbName dbname
connectInfo :: String -> IO ConnectInfo
connectInfo dbname = ConnectInfo <$> dbmsServer dbname
                          <*> (fromIntegral <$> dbPort dbname)
                          <*> dbUserName dbname <*> dbPassword dbname
                          <*> dbName dbname
connectInfo dbname = ConnectInfo <$> dbmsServer dbname
                          <*> (fromIntegral <$> dbPort dbname)
                          <*> dbUserName dbname <*> dbPassword dbname
                          <*> dbName dbname