Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
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
and codeT
@Foo
.
(There is codeT
@('MkFoo)(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 #-}