Where Quote instances for transformers should live
The Overloaded Quotation Brackets proposal is accepted and implemented. And now we have an engineering problem. To make most of it, it would be great to have
instance Quote m => Quote (ReaderT r m) where
instance Quote m => Quote (StateT s m) where
and so on instances. Where these instances should live?
-
transformers
(andtransformers-compat
?) should start depend ontemplate-haskell
(non orphans!) -
th-lift-instances
. th-orphans
The argument for the first option is that text
provides Lift
instances (and thus depends on template-haskell
), and so could depend bytestring
, containers
and transformers
.
th-lift-instances
(which is a dependency of th-orphans
) is another option. This makes sense, as Quote
is very much Lift
related (and not so much Q
).
And th-orphans
is another answer. It shims Q
instances e.g.
So my concrete proposal is to go with 2. for now (as we will need to make patches for GHC-8.12, changing unsafeTExpCoerce
to unsafeCodeCoerce
anyway, I volunteer to do that). But long term move towards option 1.
cc core-libraries-committee/ @chessai @mpickering @RyanGlScott @mgsloan
unfortunately Bruno (maintainer of th-lift-instances
) cannot be pinged here. But I don't think he'll object if we collectively decide to go with 2. (and add offer the instances with the other GHC-8.12 related stuff).
EDIT: WIP patch https://github.com/bennofs/th-lift-instances/compare/master...phadej:ghc-8.12