makeGeneric :: (a -> Anim.Frame) -> [[Sized a]] -> Sized (Anim.Frame, [[a]])
makeGeneric toFrame rows =
  Sized reqSize mkRes
  where
    (reqSize, mkPlacements) = makePlacements $ (map . map) requestedSize rows
    mkRes givenSize =
      first (mconcat . concat) . unzip2d $
      (zipWith . zipWith) locate (mkPlacements givenSize) rows
    locate (pos, size) sized =
      (Anim.translate pos (toFrame res), res)
      where
        res = fromSize sized size
makeGeneric :: (a -> Anim.Frame) -> [[Sized a]] -> Sized (Anim.Frame, [[a]])
makeGeneric toFrame rows =
  Sized reqSize mkRes
  where
    (reqSize, mkPlacements) = makePlacements $ (map . map) requestedSize rows
    mkRes givenSize =
      first (mconcat . concat) . unzip2d $
      (zipWith . zipWith) locate (mkPlacements givenSize) rows
    locate (pos, size) sized =
      (Anim.translate pos (toFrame res), res)
      where
        res = fromSize sized size
makeGeneric toFrame rows =
  Sized reqSize mkRes
  where
    (reqSize, mkPlacements) = makePlacements $ (map . map) requestedSize rows
    mkRes givenSize =
      first (mconcat . concat) . unzip2d $
      (zipWith . zipWith) locate (mkPlacements givenSize) rows
    locate (pos, size) sized =
      (Anim.translate pos (toFrame res), res)
      where
        res = fromSize sized size