manifestMaps (n : ns) res stms =
  let (res', stms') = manifestMaps ns res stms
      (params, arrs) = unzip $ loopNestingParamsAndArrs n
      lam =
        Lambda
          params
          (mkBody stms' $ varsRes res')
          (map rowType $ patTypes (loopNestingPat n))
   in ( patNames $ loopNestingPat n,
        oneStm $
          Let (loopNestingPat n) (loopNestingAux n) $
            Op $ Screma (loopNestingWidth n) arrs (mapSOAC lam)
      )
manifestMaps (n : ns) res stms =
  let (res', stms') = manifestMaps ns res stms
      (params, arrs) = unzip $ loopNestingParamsAndArrs n
      lam =
        Lambda
          params
          (mkBody stms' $ varsRes res')
          (map rowType $ patTypes (loopNestingPat n))
   in ( patNames $ loopNestingPat n,
        oneStm $
          Let (loopNestingPat n) (loopNestingAux n) $
            Op $ Screma (loopNestingWidth n) arrs (mapSOAC lam)
      )
manifestMaps (n : ns) res stms =
  let (res', stms') = manifestMaps ns res stms
      (params, arrs) = unzip $ loopNestingParamsAndArrs n
      lam =
        Lambda
          params
          (mkBody stms' $ varsRes res')
          (map rowType $ patTypes (loopNestingPat n))
   in ( patNames $ loopNestingPat n,
        oneStm $
          Let (loopNestingPat n) (loopNestingAux n) $
            Op $ Screma (loopNestingWidth n) arrs (mapSOAC lam)
      )