Closed RyanGlScott closed 4 years ago
There were two instances that could conceivably be derived, but I wasn't bold enough to do so:
Lift ShakespeareSettings
instance could be derived if we were to import the canonical orphan Lift Exp
instance from the th-orphans
library. Since th-orphans
has a number of its own library dependencies, however, I wasn't sure if it was acceptable to incur a dependency on th-orphans
.Lift
instances for Attr Resolved
and Block Resolved
could be derived if we were to define a canonical orphan instance for Builder
in some library. (th-lift-instances
seems like a good candidate.) I haven't investigated doing so yet, however.These don't necessary need to hold up this PR, but I thought it worth noting as potential improvements in the future.
Many of
shakespeare
'sLift
instances are equivalent to what would be generated byDeriveLift
, so this patch switches them over to usederiving
. For those instances that do not easily admit derived instances, I made sure thatliftTyped
was defined to avoid warnings when compiling withtemplate-haskell-2.16.*
(GHC 8.10). One example of such an instance is theLift ShakespeareSettings
instance, which relies on liftingExp
s andName
s fromtemplate-haskell
. Since there is a canonicalLift Name
orphan instance defined in the widely used, lightweightth-lift
package, I decided to just add a dependency on that. This allows making the implementation of theLift ShakespeareSettings
instance slightly cleaner.