ubTermsEnv pd ed env s args
    | Just as <- mkSubEnv ed env s args = as

subTermsEnv pd ed env s args
    | Just as <- mkSubEnv ed env s args = as
subTermsEnv pd ed env s args
    | Just as <- mkSubEnv ed env s args = as