data-effects-th-0.4.2.1: Template Haskell utilities for the data-effects library.
Copyright(c) 2023-2025 Sayo contributors
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Safe HaskellNone
LanguageGHC2021

Data.Effect.TH

Description

 
Synopsis

Documentation

(&) :: a -> (a -> b) -> b infixl 1 #

& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $, which allows & to be nested in $.

This is a version of flip id, where id is specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is (a -> b) -> a -> b. flipping this yields a -> (a -> b) -> b which is the type signature of &

Examples

Expand
>>> 5 & (+1) & show
"6"
>>> sqrt $ [1 / n^2 | n <- [1..1000]] & sum & (*6)
3.1406380562059946

Since: base-4.8.0.0

data EffectOrder #

An order of effect.

Constructors

FirstOrder 
HigherOrder 

data EffectConf Source #

Instances

Instances details
Default EffectConf Source # 
Instance details

Defined in Data.Effect.TH.Internal

Methods

def :: EffectConf #

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.

data Infinite a #

Type of infinite lists.

In terms of recursion schemes, Infinite a is a fix point of the base functor (a,), foldr is a catamorphism and unfoldr is an anamorphism.

Constructors

a :< (Infinite a) infixr 5