-- NOTE: [Weakening]
--
-- Weakening is something we usually take for granted: every time you learn a
-- new word, old sentences still make sense. If a conclusion is justified by a
-- hypothesis, it is still justified if you add more hypotheses. Similarly, a
-- term remains in scope if you bind more (fresh) variables. Weakening is the
-- operation of shifting things from one scope to a larger scope in which new
-- things have become meaningful, but no old things have vanished.
--
-- When we use a named representation (or HOAS) we get weakening for free. But
-- in the de Bruijn representation weakening takes work: you have to shift all
-- variable references to make room for the new bindings.
--

-- Functions to increase the scope of scalar or array environments of OpenAcc
-- tied expressions by a single index.
--
weakenA :: OpenAcc aenv t -> OpenAcc (aenv, s) t
weakenA = weakenByA SuccIdx
weakenA :: OpenAcc aenv t -> OpenAcc (aenv, s) t
weakenA = weakenByA SuccIdx
weakenA = weakenByA SuccIdx