"we know that forM will not change the number of elements in the container by leaning on the Traversable laws alone" https://ghc.haskell.org/trac/ghc/wiki/Prelude710/FTP
Related Posts
One day I am going to reach the height of technological sophistication, and every clock in my house will handle daylight savings automatically.
I'm not there yet. I think modern appliances are getting better though.
(Does a microwave really need to know the current time?)
What are the most popular languages that have used an AST walker for their implementation?
I know Ruby used to do this, but there must be others.
(I'm interested in the lowest PL speed that users will tolerate if you have awesome features.)
In LSP, a position is represented as a line number and a column offset (in Unicode code units): https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position
This is pretty elegant. You'll get the correct line regardless of encoding bugs, and the editor already knows the line number so it's cheap to compute.