We came up with a way of reifying specifications of web APIs at the type level, and built a web framework around it. The basic idea was, I believe, first developed by Ralf Lämmel and Klaus Ostermann [0], as a Haskell solution to the expression problem, but I think it's the first large-scale application of these ideas.
Checking for correctness and deriving functionality from that comes pretty naturally after that, so it's easy to reduce boilerplate (e.g., generate client libraries and documentation automatically) and make static guarantees (e.g., that a link exists within an API, and won't 404).
[0] http://www.informatik.uni-marburg.de/~kos/papers/gpce06.pdf