HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleoptics-th-0.4.1Haskell2010

Optics.TH.Internal.Utils

  • 17 values
  • Packageoptics-th-0.4.1
  • Exports17
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUtils.hs
valuetoTupleE :: [ExpQ] -> ExpQ
#

Construct a tuple value given a list of expressions.

valuetoTupleP :: [PatQ] -> PatQ
#

Construct a tuple pattern given a list of patterns.

valuequantifyType :: [TyVarBndrSpec] -> Cxt -> Type -> Type
#

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

valuerequireExtensions :: String -> [[Extension]] -> Q ()
#

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]]