th-lift-0.8.6: Derive Template Haskell's Lift class for datatypes.

Safe Haskell | None
Language | Haskell2010

Language.Haskell.TH.Lift.Internal

Description

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.

Synopsis

- errorQuoteExp :: Quote q => String -> q Exp
- unsafeSpliceCoerce :: forall a m. Quote m => m Exp -> Code m a

# Documentation

errorQuoteExp :: Quote q => String -> q Exp Source #

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.

unsafeSpliceCoerce :: forall a m. Quote m => m Exp -> Code m a Source #

This is a cargo-culted version of `unsafeSpliceCoerce` from the `th-compat` library, which has been copied here to avoid incurring a library dependency.