hxt-9.3.1.15: A collection of tools for processing XML with Haskell.

Copyright | Copyright (C) 2011 Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt (uwe\@fh-wedel.de)
Stability | experimental
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Control.FlatSeq

Description

Force evaluation like deepseq in Control.DeepSeq, but control the depth of evaluation. flatseq may evaluate more than seq but less than deepseq

Synopsis

- ($!!) :: WNFData a => (a -> b) -> a -> b
- flatseq :: WNFData a => a -> b -> b
- rlnf :: (a -> ()) -> [a] -> ()
- class WNFData a where
  - rwnf :: a -> ()
  - rwnf2 :: a -> ()

# Documentation

($!!) :: WNFData a => (a -> b) -> a -> b infixr 0 Source

flatseq :: WNFData a => a -> b -> b Source

rlnf :: (a -> ()) -> [a] -> () Source

class WNFData a where Source

A class of types that can be partially evaluated, but evaluation can be propagated deeper than WHNF

Minimal complete definition

Nothing

Methods

rwnf :: a -> () Source

Default for rwnf is reduction to WHNF

rwnf2 :: a -> () Source

Default for rwnf2 is rwnf

Instances

WNFData Bool Source |
WNFData Char Source |
WNFData Double Source |
WNFData Float Source |
WNFData Int Source |
WNFData Integer Source |
WNFData Word Source |
WNFData Word8 Source |
WNFData Word16 Source |
WNFData Word32 Source |
WNFData Word64 Source |
WNFData () Source |
WNFData QName Source |
WNFData XName Source |
WNFData DTDElem Source |
WNFData XNode Source |
WNFData a => WNFData [a] Source |
WNFData a => WNFData (NTree a) Source |
(WNFData a, WNFData b) => WNFData (a, b) Source |
(WNFData a, WNFData b, WNFData c) => WNFData (a, b, c) Source |
(WNFData a, WNFData b, WNFData c, WNFData d) => WNFData (a, b, c, d) Source |