codet-plugin-0.1: GHC type-checker plugin for solving LiftT instances from codet
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Haskell.TH.CodeT.Plugin

Synopsis

Documentation

plugin :: Plugin Source #

A GHC type-checker plugin which solves LiftT instances.

At the moment plugin solves only type constructor instances, e.g. for a data type

data Foo a = MkFoo a

the plugin will solve needed instances in codeT @Foo and codeT @('MkFoo). (There is (LiftT f, LiftT x) => LiftT (f x) existing instance, so plugin doesn't need to).

Noteably, the plugin solves only for algebraic type constructors (data, newtype, class) and promoted data constructors. Specifically it doesn't solve for type-family type constructors.

Enable plugin with:

{-# OPTIONS_GHC -fplugin=Language.Haskell.TH.CodeT.Plugin #-}