In many cases a file is marked with an extension be of a type which can be processed by a specific program. Examples: programs for GHC have extension 'hs' or 'lhs', text to be processed by a latex engine has 'tex' etc.
The same extensions are also use to indicate files which contain text written in the repsective languages and can be combined with other such pieces to form an input for the respective program.
Examples: A text for processing by a latex engine must have a specific structure. The snippets which await combination cannot be processed.
My focus at the moment is only the separation of objects which are complete, ready to go and snippets in the same language, which must be combined before they are complete.
It seems proper, to mark complete objects with types, marked with the ordinary extensions; the snippets could be marked wtih combinations. E.g. tex snippets as texsnip (or texpre for pieces which must go to the preamble).
I sense there is a pattern, where things are composed of one starter followed by several similar things, perhaps generalized to one starter composed by several things which are composed themselves - a tree structure.
There must be two operations: a linearize and a unlinearize (a parser).
How much can be gained by promoting this structure and generalized operations to linearize and unlinearize?
Produced with SGG on with master5.dtpl.