Apply arguments to a type constructor
Moduleoptics-th-0.4.1Haskell2010
Optics.TH.Internal.Utils
- 17 values
- Packageoptics-th-0.4.1
- Exports17
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceUtils.hs
Apply arguments to a function
Construct a tuple type given a list of types.
Construct a tuple value given a list of expressions.
Construct a tuple pattern given a list of patterns.
Apply arguments to a type constructor.
Generate many new names from a given base name.
Fill in kind variables using info from datatype type parameters.
Template Haskell wants type variables declared in a forall, so we find all free type variables in a given type and declare them.
This function works like quantifyType except that it takes a list of variables to exclude from quantification.
Pass in a list of lists of extensions, where any of the given extensions will satisfy it. For example, you might need either GADTs or ExistentialQuantification, so you'd write:
requireExtensions [[GADTs, ExistentialQuantification]]But if you need TypeFamilies and MultiParamTypeClasses, then you'd write:
requireExtensions [[TypeFamilies], [MultiParamTypeClasses]]