Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
I'm always worried about perf when I'm writing mtl-style code, especially wrt Lucid because, early-on I discovered unexpected perf issues - https://github.com/chrisdone/lucid/issues/63
Are there any thumb-rules to get good perf out-of-the-box when writing mt-style code? i.e. without having to necessarily benchmark stuff (because benchmarking properly takes a considerable amount of time).
One idea is to use inspection-testing to make sure there are no Monad dictionaries being passed in the optimized Core.
There is definitely some related reading here - https://github.com/ghc-proposals/ghc-proposals/pull/313
I think there was some ""conclusion"" (please don't quote me! :D) that you need some SPECIALISE pragmas (for mtl)
I'm pretty sure Alexis has written up a lot of stuff somewhere else too, but I can't find it (or maybe it's already covered in the proposal)