Haskell GeneralizedNewtypeDeriving mechanism is great; for those who did not see it by writing something like
newtype SkewOptT 𝔪 α = SkewOptT (StateT Bool 𝔪 α) deriving (Applicative, Functor, Monad, MonadTrans)
automatically generates instances such as
instance [overlap ok] Monad 𝔪 => Monad (SkewOptT 𝔪)
However, for one of my classes, I want to set up several methods. Is there a way to override or disable what GeneralizedNewtypeDeriving does for these methods? The typeclass class encodes some basic DSL instructions, such as for (loop), parfor (parallel loop), fcndef (add a new function), etc., And there is no ideal way to break it up into several types of styles [and then automatically output one and manually record another].
source share