-- | An order is problematic if at least one of its items was overdue.
problematicOrders :: Interval -> Q [Text]
problematicOrders interval =
    [ o_orderpriorityQ o
    | o <- orders
    , o_orderdateQ o `inInterval` interval
    , hasOverdueItem o
    ]
problematicOrders :: Interval -> Q [Text]
problematicOrders interval =
    [ o_orderpriorityQ o
    | o <- orders
    , o_orderdateQ o `inInterval` interval
    , hasOverdueItem o
    ]
problematicOrders interval =
    [ o_orderpriorityQ o
    | o <- orders
    , o_orderdateQ o `inInterval` interval
    , hasOverdueItem o
    ]