lens-5.0.1: Lenses, Folds and Traversals
Copyright (C) 2013-2016 Edward Kmett and Eric Mertens
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability experimental
Portability non-portable
Safe Haskell Safe
Language Haskell2010

Control.Lens.Internal.TH

Description

Synopsis

Documentation

appsT :: TypeQ -> [ TypeQ ] -> TypeQ Source #

Apply arguments to a type constructor

appsE1 :: ExpQ -> [ ExpQ ] -> ExpQ Source #

Apply arguments to a function

toTupleT :: [ TypeQ ] -> TypeQ Source #

Construct a tuple type given a list of types.

toTupleE :: [ ExpQ ] -> ExpQ Source #

Construct a tuple value given a list of expressions.

toTupleP :: [ PatQ ] -> PatQ Source #

Construct a tuple pattern given a list of patterns.

conAppsT :: Name -> [ Type ] -> Type Source #

Apply arguments to a type constructor.

newNames Source #

Arguments

:: String

base name

-> Int

count

-> Q [ Name ]

Generate many new names from a given base name.

unfoldType :: Type -> ( Type , [ Type ]) Source #

Decompose an applied type into its individual components. For example, this:

Either Int Char

would be unfolded to this:

(ConT ''Either, [ConT ''Int, ConT ''Char])

This function ignores explicit parentheses and visible kind applications.

quantifyType :: Cxt -> Type -> Type Source #

Template Haskell wants type variables declared in a forall, so we find all free type variables in a given type and declare them.

quantifyType' :: Set Name -> Cxt -> Type -> Type Source #

This function works like quantifyType except that it takes a list of variables to exclude from quantification.

tvbToType :: TyVarBndr_ flag -> Type Source #

Convert a TyVarBndr into its corresponding Type .

unSigT :: Type -> Type Source #

Peel off a kind signature from a Type (if it has one).