-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Derive Template Haskell's Lift class for datatypes.
--   
--   Derive Template Haskell's Lift class for datatypes using
--   TemplateHaskell. The functionality in this package has
--   largely been subsumed by the DeriveLift language extension,
--   which is available in GHC 8.0 and later versions. As such, this
--   package is only useful as a way to backport bugfixes to
--   DeriveLift in later GHC versions back to older GHCs.
--   
--   The following libraries are related:
--   
--   
--   
- The th-orphans package provides instances for
--   template-haskell syntax types.
--   
- The th-lift-instances package provides Lift
--   instances for types in base, text,
--   bytestring, vector, etc. Some of these instances are
--   only provided for old versions of their respective libraries, as the
--   same Lift instances are also present upstream on newer
--   versions.
--   
@package th-lift
@version 0.8.6

-- | Helper functions used in code that Language.Haskell.TH.Lift
--   generates.
--   
--   Note: this is an internal module, and as such, the API presented here
--   is not guaranteed to be stable, even between minor releases of this
--   library.
module Language.Haskell.TH.Lift.Internal

-- | A type-restricted version of error that ensures
--   makeLift always returns a value of type q Exp
--   (where q is an instance of Quote), even when used on
--   an empty datatype.
errorQuoteExp :: Quote q => String -> q Exp

-- | This is a cargo-culted version of unsafeSpliceCoerce from the
--   th-compat library, which has been copied here to avoid
--   incurring a library dependency.
unsafeSpliceCoerce :: forall a m. Quote m => m Exp -> Code m a

module Language.Haskell.TH.Lift
deriveLift :: Name -> Q [Dec]

-- | Derive Lift instances for many datatypes.
deriveLiftMany :: [Name] -> Q [Dec]

-- | Obtain Info values through a custom reification function. This
--   is useful when generating instances for datatypes that have not yet
--   been declared.
deriveLift' :: [Role] -> Info -> Q [Dec]
deriveLiftMany' :: [([Role], Info)] -> Q [Dec]

-- | Generates a lambda expresson which behaves like lift (without
--   requiring a Lift instance). Example:
--   
--   
--   newtype Fix f = In { out :: f (Fix f) }
--   
--   instance Lift (f (Fix f)) => Lift (Fix f) where
--     lift = $(makeLift ''Fix)
--   
--   
--   This can be useful when deriveLift is not clever enough to
--   infer the correct instance context, such as in the example above.
makeLift :: Name -> Q Exp

-- | Like makeLift, but using a custom reification function.
makeLift' :: Info -> Q Exp
class Lift (t :: TYPE r)
lift :: (Lift t, Quote m) => t -> m Exp
liftTyped :: forall (m :: Type -> Type). (Lift t, Quote m) => t -> Code m t
instance Language.Haskell.TH.Syntax.Lift Language.Haskell.TH.Syntax.ModName
instance Language.Haskell.TH.Syntax.Lift Language.Haskell.TH.Syntax.Name
instance Language.Haskell.TH.Syntax.Lift Language.Haskell.TH.Syntax.NameFlavour
instance Language.Haskell.TH.Syntax.Lift Language.Haskell.TH.Syntax.NameSpace
instance Language.Haskell.TH.Syntax.Lift Language.Haskell.TH.Syntax.OccName
instance Language.Haskell.TH.Syntax.Lift Language.Haskell.TH.Syntax.PkgName
