Interestingly, Amr Sabry coauthored such a paper. The story was, he tried to reimplement Dan Friedman’s miniKanren in Haskell, but couldn’t figure out how to compose the monads. He had to seek help from Oleg Kiselyov, arguably the world’s most knowledgeable person about Haskell’s type system. And if you don’t know, Amr Sabry is probably the world’s most knowledgeable person about purely functional programming languages. They coauthored a paper after solving the problem with Oleg’s help. Ironically, Dan Friedman, the original author of that piece of code, didn’t have any such trouble writing it in Scheme.