derive-0.1.4: A program and library to derive instances for data typesSource codeContentsIndex
Data.Derive.LazySet
Description

A pseudo derivation. For each field in the data type, deriving LazySet generates a function like a record updator, but lazy. This is very useful in certain situations to improve laziness properties. Example:

 data Foo = Foo { x :: Int, y :: Int, z :: Int }

becomes:

 setX v f = Foo v (y f) (z f)
 setY v f = Foo (x f) v (z f)
 setZ v f = Foo (x f) (y f) v
Documentation
makeLazySet :: DerivationSource
Produced by Haddock version 2.4.2