My minimal reproduction is
type MyString = String
newtype WrappedString = WrappedString MyString
derive newtype instance semigroupWrappedString :: Semigroup WrappedString
which produces the error
No type class instance was found for
Data.Semigroup.Semigroup MyString
while checking that expression #dict Semigroup
has type { append :: WrappedString -> WrappedString -> WrappedString
}
in value declaration semigroupWrappedString
even though
newtype WrappedString = WrappedString String
derive newtype instance semigroupWrappedString :: Semigroup WrappedString
compiles without error.
(Originally posted incorrectly to #2416, but this is a different bug.)
My minimal reproduction is
which produces the error
even though
compiles without error.
(Originally posted incorrectly to #2416, but this is a different bug.)