Sorry, my ability to proof-read what I've just written seems to
have completely deserted me.
How's this? I also added some more explanation.
`
{- The user has split unrecorded into the sequence 'norevert' then 'torevert',
   which is natural as the bit we keep in unrecorded should have recorded
   as the context.
   But the unrevert patch also needs to have recorded as the context, not
   unrecorded (which can be changed by the user at any time).
   So we need to commute 'torevert' with 'norevert', and if that fails then
   we need to keep some of 'norevert' in the actual unrevert patch so it
   still makes sense. The use of genCommuteWhatWeCanRL minimises the amount
   of 'norevert' that we need to keep.
-}
`
    
    |