(This contains some of the refactor commits from #391, only the last commit changes showFroms substantially)
This pulls apart the display logic and the data munging in showFroms, for ease of understanding.
The resulting code is a bit longer, but uses a nice to understand pipeline of sortOn, groupOn and mapMaybe.
The main complications came from the fact that both the packageName and the targetModule are optional fields, but now it should be fairly straight forward.
(This contains some of the refactor commits from #391, only the last commit changes showFroms substantially)
This pulls apart the display logic and the data munging in
showFroms
, for ease of understanding. The resulting code is a bit longer, but uses a nice to understand pipeline ofsortOn
,groupOn
andmapMaybe
.The main complications came from the fact that both the
packageName
and thetargetModule
are optional fields, but now it should be fairly straight forward.