But when it came to testing the REST API handlers (written with Servant) I was again stuck in the IO Monad as the Handler type is defined as newtype Handler a = Handler { runHandler' :: ExceptT ServerError IO a }. Maybe it's not a principle issue but just my brain being too small...
кмк, если в языке есть явные инструменты для прописывания интерфейсов/других способов соблюдения контрактов - не должно особо возникать вопросов об архитектуре