generic-deepseq-1.0.0.0: Generic deep evaluation of data structures

Portabilityportable
Stabilitystable
MaintainerMaxime Henrion <mhenrion@gmail.com>
Safe HaskellSafe-Infered

Control.DeepSeq

Contents

Description

This module provides a deepseq function for fully evaluating data structures (that is, evaluating to "Normal Form", and not just up to "Head Normal Form" like seq does).

It uses the GHC.Generics framework so that you can generate instances for your datatypes without having to provide an implementation.

Synopsis

Documentation

class DeepSeq a whereSource

Methods

deepseq :: a -> b -> bSource

Evaluates its first argument to normal form, and then returns its second argument as the result.

Instances

DeepSeq Bool 
DeepSeq Char 
DeepSeq Double 
DeepSeq Float 
DeepSeq Int 
DeepSeq Int8 
DeepSeq Int16 
DeepSeq Int32 
DeepSeq Int64 
DeepSeq Integer 
DeepSeq Ordering 
DeepSeq Word 
DeepSeq Word8 
DeepSeq Word16 
DeepSeq Word32 
DeepSeq Word64 
DeepSeq () 
DeepSeq a => DeepSeq [a] 
DeepSeq a => DeepSeq (Maybe a) 
(DeepSeq a, DeepSeq b) => DeepSeq (Either a b) 
(DeepSeq a, DeepSeq b) => DeepSeq (a, b) 
(DeepSeq a, DeepSeq b, DeepSeq c) => DeepSeq (a, b, c) 
(DeepSeq a, DeepSeq b, DeepSeq c, DeepSeq d) => DeepSeq (a, b, c, d) 
(DeepSeq a, DeepSeq b, DeepSeq c, DeepSeq d, DeepSeq e) => DeepSeq (a, b, c, d, e) 
(DeepSeq a, DeepSeq b, DeepSeq c, DeepSeq d, DeepSeq e, DeepSeq f) => DeepSeq (a, b, c, d, e, f) 
(DeepSeq a, DeepSeq b, DeepSeq c, DeepSeq d, DeepSeq e, DeepSeq f, DeepSeq g) => DeepSeq (a, b, c, d, e, f, g) 

Convenience functions

($!!) :: DeepSeq a => (a -> b) -> a -> bSource

The deep analogue of $!.

rnf :: DeepSeq a => a -> ()Source

force :: DeepSeq a => a -> aSource