Halliday & Matthiessen (2014: 570):
The time-phase system has split into two. The original opposition is doing/is to do (meaning, in modern terms, ‘keeps doing’ and ‘will do’) has disappeared, since both have turned into grammatical categories of the verbal group. The former has evolved into tense, defined along the dimension of future/present/past. Thus the be ... ing form, as in he is doing, which was originally two verbal groups like modern keeps doing, is now the secondary present tense form within the one group, meaning ‘present in ...’; e.g. is doing ‘present in present’, was doing ‘present in past’, will have been doing ‘present in past in future’, was going to be doing ‘present in future in past’, etc. The latter, the be to ... form, as in he is to do, similarly turned into a secondary future; but here there has been a further change: is to has now turned into a modal form, and its function as secondary tense has been taken over by is going to.