Safe Haskell | None |
---|---|
Language | Haskell2010 |
Record types in Haskell can be made lazy through lazy pattern
matching. This module offers functions for making them lazy
generically. Whereas Data.Lazify.genericLazify
uses Lazifiable
to lazify under a newtype
, the
functions in this module expect the underlying type of a newtype
to be Generic
as well.
- lazifyGeneric :: (Generic a, LazifiableG (Rep a)) => a -> a
- ($~) :: forall rep a (b :: TYPE rep). (Generic a, LazifiableG (Rep a)) => (a -> b) -> a -> b
Documentation
lazifyGeneric :: (Generic a, LazifiableG (Rep a)) => a -> a Source #
Lazify a record using its generic representation.
Note that newtypes are treated specially: a newtype is lazified by lazifying its underlying type.