regular-0.2.2: Generic programming library for regular datatypes.

Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org

Generics.Regular.Functions.Seq

Description

Summary: Deep generic seq. Used to fully evaluate a term.

Synopsis

Documentation

class DeepSeq a whereSource

A general class for expressing deep seq. It is used in the K case for the generic seq.

We do not give an instance of the form instance (Regular a, Seq (PF a)) => DeepSeq a where dseq = gdseq because this requires undecidable instances. However, any type for which there is a generic instance can be given a trivial instance of DeepSeq by using gdseq.

Methods

dseq :: a -> b -> bSource

class Seq f whereSource

The class for generic deep seq.

Methods

gseq :: (a -> b -> b) -> f a -> b -> bSource

Instances

Seq U 
Seq I 
DeepSeq a => Seq (K a)

For constants we rely on the |DeepSeq| class.

Seq f => Seq (S s f) 
Seq f => Seq (C c f) 
(Seq f, Seq g) => Seq (:*: f g) 
(Seq f, Seq g) => Seq (:+: f g) 

gdseq :: (Regular a, Seq (PF a)) => a -> b -> bSource

Deep, generic version of seq.