Thank you for the suggestion and apologies for the delay in relying: I have recently returned from holiday.
The idea is an interesting one, but a difficulty is that there is no representation of width as such in the code. Instead, there are abstract way constraints of one of two types: either permissive or prohibitive. Permissive constraints permit vehicles that have a matching constraint to travel upon them (ways without a matching constraint cannot be traversed by the vehicle). Prohibitive constraints prohibit all but vehicles with matching constraints from travelling upon them (vehicles without a matching constraint cannot traverse the way).
For waterways, we have quite a large set of constraints. Waterways generally have a single permissive "waterway" constraint, which allows boats that are not capable of travelling on the open ocean to travel on them. Waterways (be they rivers or canals) also have a series of prohibitive constraints:
(1) tub boat canal;
(2) narrowboat canal;
(3) barge canal; and
(4) ship canal.
All of the boats with the "tub boat canal" constraints are also coded with "narrowboat canal", "barge canal" and "ship canal" constraints; all of the boats with "narrowboat canal" are also coded with "barge canal" and "ship canal" constraints, and all of the boats with "barge canal" are also coded with "ship canal" constraints. This establishes in practice a hierarchy of canal/river sizes, so that smaller boats can travel on larger canals/rivers, but not vice versa.
However, this hierarchy is implemented entirely at pakset level and cannot unpicked on the fly (at least, not without some fantastically complex and probably very unreliable code, as the game would have to infer the hierarchy of ways by comparing the constraints of different vehicles). All that the code sees is a series of constraints. It would not be too hard to allow a canal to be built next to a river with an identical matching set of constraints, but the code would not know that "ship canal" ranks higher than "barge canal", and, whilst the boats have multiple constraints, the rivers/canals have only one constraint. Thus, a small canal could not be built next to a large river, which would be arbitrary and less comprehensible to players than the current system.