An experiment could be done by adding the {-# LANGUAGE Safe #-} pragma to the Server.hs file and then seeing how the compilation works. It should not hinder the usage of type-unsafe features in the main application. To retrofit Server.hs some of the functor, applicative instances need to be hand derived, which is not a huge problem. The goal is to constrain what kind of code can be written in the Server monad.
An experiment could be done by adding the
{-# LANGUAGE Safe #-}pragma to the Server.hs file and then seeing how the compilation works. It should not hinder the usage of type-unsafe features in the main application. To retrofit Server.hs some of the functor, applicative instances need to be hand derived, which is not a huge problem. The goal is to constrain what kind of code can be written in the Server monad.