Yea I've had this discussion with a friend of mine who likes Haskell and got me in to Elm. He claimed you could only get that kind of tool in something like those languages which have stricter and stronger type systems. I'm not familiar with the details, but it looks like you ran in to that problem too.
I'm a mathematician, so the only satisfactory solution to me would be one that is "clearly correct". As soon as you need to first get agreement about the definition you are using, you are probably not designing a clean and beautiful thing :)