Behaviour of DerivingVia is different between GHC 8.6.3 and GHC 8.6.4
May relate: #15376
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE StandaloneDeriving #-}
module TestSpace.PolyKinds where
import Control.Monad.Trans.Reader
newtype T m a = T (Int -> m a)
deriving via (ReaderT Int m) instance Functor m => Functor (T m)
with transformers
is failed to compile on GHC 8.6.3 and is succeeded on 8.6.4 .
However, this is very sensitive.
I got this example on cabal
project, the behaviour is affected by whether to run cabal new-freeze
and version of transformers
.
Sample is here: https://github.com/mizunashi-mana/maybreak-derivingvia
My environment:
- OS: macOS Mojave 10.14.3
- CPU: Intel Core i7