Skip to content

Add rwhnf helper for NF=WHNF instances #3

@hvr

Description

@hvr

Here's an idea for a helper I wanted to document:

-- | Reduce to weak head normal form -- -- Useful for defining 'NFData' for types for which NF=WHNF holds. -- -- > data T = C1 | C2 | C3 -- > instance NFData T where rnf = rwhnf rwhnf :: a -> () rwhnf !_ = ()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions