you can keep the asymptotics down a little if you define
type AllExprStages :: (Type -> Constraint) -> k -> Constraint
type AllExprStages constraint stage = (constraint (XVar stage), constraint (XLit stage), ...)
and then use
deriving instance (AllExprStages Show stage) => Show (GExpr stage)
type AllExprStages :: (Type -> Constraint) -> k -> Constraint
type AllExprStages constraint stage = (constraint (XVar stage), constraint (XLit stage), ...)
and then use
deriving instance (AllExprStages Show stage) => Show (GExpr stage)
Comments