haskell-language-server recently got some basic integration with the retrie plugin, and can offer to do folding and unfolding: https://github.com/haskell/haskell-language-server/pull/266 Luke Lau