parsley-core-2.3.0.0: A fast parser combinator library backed by Typed Template Haskell
LicenseBSD-3-Clause
MaintainerJamie Willis
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Parsley.Internal.Common.THUtils

Description

This module contains some Template Haskell related functions for manipulating template haskell as a lower, combinator-based, level.

Since: 2.3.0.0

Synopsis

Documentation

eta :: Code a -> Code a Source #

Given a function (of arbitrarily many arguments, but it must at least have 1), eta-reduces it to remove redundant arguments.

Since: 2.3.0.0

unsafeCodeCoerce :: forall (r :: RuntimeRep) (a :: TYPE r) m. Quote m => m Exp -> Code m a #

Unsafely convert an untyped code representation into a typed code representation.

unTypeCode :: forall (r :: RuntimeRep) (a :: TYPE r) m. Quote m => Code m a -> m Exp #

Extract the untyped representation from the typed representation