hoogle icon indicating copy to clipboard operation
hoogle copied to clipboard

Action/Server: rewrite showFroms to be clearer

Open Profpatsch opened this issue 3 years ago • 2 comments

(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.

Profpatsch avatar Oct 10 '22 11:10 Profpatsch

cc @smatting

Profpatsch avatar Oct 10 '22 11:10 Profpatsch

Once https://github.com/ndmitchell/hoogle/pull/391 is merged, this is only one commit.

Profpatsch avatar Mar 19 '23 16:03 Profpatsch