Recently released elm-codegen package will help greatly to avoid to produce code that doesn't compile.
The idea is to generate the bindings for the Elm-ui package, add to this repo, and make it straightforward for the Elm compiler to check for any mismatched type.