offsetMemoryInKernelBody :: RebaseMap -> KernelBody InKernel
                         -> KernelBody InKernel
offsetMemoryInKernelBody initial_offsets kbody =
  kbody { kernelBodyStms = stms' }
  where stms' = snd $ mapAccumL offsetMemoryInStm initial_offsets $ kernelBodyStms kbody
offsetMemoryInKernelBody :: RebaseMap -> KernelBody InKernel
                         -> KernelBody InKernel
offsetMemoryInKernelBody initial_offsets kbody =
  kbody { kernelBodyStms = stms' }
  where stms' = snd $ mapAccumL offsetMemoryInStm initial_offsets $ kernelBodyStms kbody
offsetMemoryInKernelBody initial_offsets kbody =
  kbody { kernelBodyStms = stms' }
  where stms' = snd $ mapAccumL offsetMemoryInStm initial_offsets $ kernelBodyStms kbody