data-effects-th-0.1.0.0: Template Haskell utilities for the data-effects library.
Copyright(c) 2010-2011 Patrick Bahr Tom Hvitved
(c) 2023 Yamada Ryo
LicenseMPL-2.0 (see the file LICENSE)
Maintainer[email protected]
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Effect.HFunctor.TH.Internal

Description

 
Synopsis

Documentation

deriveHFunctor :: (Infinite (Q Type) -> Q Type) -> DataInfo -> Q [Dec] Source #

Derive an instance of HFunctor for a type constructor of any higher-order kind taking at least two arguments.

wrapLam :: (Exp -> Q Exp) -> Q Exp Source #

mapTupleE :: (Type -> Exp -> Q Exp) -> Type -> Exp -> Maybe (Q Exp) Source #

Utility functions

newNames :: Int -> String -> Q [Name] Source #

This function provides a list (of the given length) of new names based on the given string.

iter :: (Eq t, Num t, Quote m) => t -> m Exp -> m Exp -> m Exp Source #