One direction of a result of Warfield

The result is a structure theorem for finitely presented modules
over a ring R whose local rings are generalized valuation rings
(for every a and b in the ring either a divides b or conversely).
Namely, every such module is a summand of a direct sum of
modules of the form R/fR.

This then quickly gives the structure of finite modules
over a PID.

So much fun!
Lemma Tag 05U9 for valuation rings

Thanks to Ofer Gabber