We're getting into the part of #adventofcode 2021 where data structures really matter, and it's a fun thing to consider – most day to day programming problems aren't this obviously about that.
Anyway, here's my (commented) solution for Day 5:
https://replit.com/@T045T/AoC-2021-Day-5#main.hs
It's not super performant, but good enough. I'm pretty sure at least part of it is due to Data.Map being an ordered Map, when I don't really need it to be.