-- | Constructor for type Packing, creating either a Just Packing or Nothing
mkPackingMaybe :: LoadSpace -> [IndexedSpace] -> [ResidualSpace] -> Int -> Maybe Packing
mkPackingMaybe l is rs used
  | packing <- mkPacking l is rs used
  , Packing{} <- packing
  = Just packing
  | otherwise
  = Nothing
mkPackingMaybe :: LoadSpace -> [IndexedSpace] -> [ResidualSpace] -> Int -> Maybe Packing
mkPackingMaybe l is rs used
  | packing <- mkPacking l is rs used
  , Packing{} <- packing
  = Just packing
  | otherwise
  = Nothing
mkPackingMaybe l is rs used
  | packing <- mkPacking l is rs used
  , Packing{} <- packing
  = Just packing
  | otherwise
  = Nothing