delivery :: Delivery -> IO ()
delivery del = putStrLn $
  case del of
    Delivered id  -> "delivered " ++ id
    DeliveryError id errNo errStr -> "not delivered " ++ id ++ ": " ++ errStr
    DeliveryProgress id status    -> "progress "      ++ id ++ ": " ++ status
delivery :: Delivery -> IO ()
delivery del = putStrLn $
  case del of
    Delivered id  -> "delivered " ++ id
    DeliveryError id errNo errStr -> "not delivered " ++ id ++ ": " ++ errStr
    DeliveryProgress id status    -> "progress "      ++ id ++ ": " ++ status
delivery del = putStrLn $
  case del of
    Delivered id  -> "delivered " ++ id
    DeliveryError id errNo errStr -> "not delivered " ++ id ++ ": " ++ errStr
    DeliveryProgress id status    -> "progress "      ++ id ++ ": " ++ status