How to bring Elm's safety to Haskell?

Also if you want to go deeper into type-safety this is a nice article about less obvious unsafe things https://www.fpcomplete.com/blog/2018/01/weakly-typed-haskell and almost tutorial how to design typesafe APIs.