th-lego-0.1.0.3: Template Haskell construction utilities

Safe HaskellNone
LanguageHaskell2010

THLego.Lambdas

Synopsis

Documentation

matcher :: [Match] -> Exp Source #

Simulates lambda-case without the need for extension.

productGetter Source #

Arguments

:: Name

Constructor name.

-> Int

Total amount of members.

-> Int

Index of the member.

-> Exp

Lambda expression of the following form:

product -> member

Lambda expression, which extracts a product member by index.

productSetter Source #

Arguments

:: Name

Constructor name.

-> Int

Total amount of members.

-> Int

Index of the member.

-> Exp

Lambda expression of the following form:

product -> member -> product

Lambda expression, which sets a product member by index.