lens-4.19.2: Lenses, Folds and Traversals
Copyright(C) 2013-2016 Edward Kmett and Eric Mertens
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Control.Lens.Internal.TH

Description

 
Synopsis

Documentation

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

Apply arguments to a type constructor

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

Apply arguments to a function

toTupleT :: [TypeQ] -> TypeQ #

Construct a tuple type given a list of types.

toTupleE :: [ExpQ] -> ExpQ #

Construct a tuple value given a list of expressions.

toTupleP :: [PatQ] -> PatQ #

Construct a tuple pattern given a list of patterns.

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

Apply arguments to a type constructor.

bndrName :: TyVarBndr -> Name #

Return Name contained in a TyVarBndr.

fromSet :: (k -> v) -> Set k -> Map k v #

newNames #

Arguments

:: String

base name

-> Int

count

-> Q [Name] 

Generate many new names from a given base name.

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

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.

phantom2 :: (Functor f, Contravariant f) => f a -> f b #