-report :: IConnection a => a -> Bool -> IO String
-report conn do_detail =
- if do_detail
- then report_detail conn
- else report_summary conn
+-- | Given a connection and a 'Configuration', produces the report as
+-- a 'String'.
+--
+report :: IConnection a => Configuration -> a -> IO String
+report cfg conn =
+ if (detail cfg)
+ then report_detail conn (detail_query cfg)
+ else report_summary conn (summary_query cfg)