Control.Arrow.ArrowNF

hxt-9.3.1.22: 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 | non-portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Control.Arrow.ArrowNF

Description

Arrows for evaluation of normal form results

Synopsis

- strictA :: (Arrow a, NFData b) => a b b
- class Arrow a => ArrowNF (a :: Type -> Type -> Type) where
  - rnfA :: NFData c => a b c -> a b c
- class (Arrow a, ArrowList a) => ArrowWNF (a :: Type -> Type -> Type) where
  - rwnfA :: WNFData c => a b c -> a b c
  - rwnf2A :: WNFData c => a b c -> a b c

# Documentation

strictA :: (Arrow a, NFData b) => a b b #

complete evaluation of an arrow result using `DeepSeq`

this is sometimes useful for preventing space leaks, especially after reading and validation of a document, all DTD stuff is not longer in use and can be recycled by the GC.

class Arrow a => ArrowNF (a :: Type -> Type -> Type) where #

Minimal complete definition

Nothing

Methods

rnfA :: NFData c => a b c -> a b c #

#### Instances

Instances details

ArrowNF IOLA # |
Instance details Defined in Control.Arrow.IOListArrow Methods rnfA :: NFData c => IOLA b c -> IOLA b c #
ArrowNF LA # |
Instance details Defined in Control.Arrow.ListArrow Methods rnfA :: NFData c => LA b c -> LA b c #
ArrowNF (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods rnfA :: NFData c => IOSLA s b c -> IOSLA s b c #
ArrowNF (SLA s) # |
Instance details Defined in Control.Arrow.StateListArrow Methods rnfA :: NFData c => SLA s b c -> SLA s b c #

class (Arrow a, ArrowList a) => ArrowWNF (a :: Type -> Type -> Type) where #

partial evaluation of an arrow result using `FlatSeq`

There are two arrows with force the partial evaluation. By convention the 2. should be less lazy than the 1.

These arrows are sometimes useful for preventing space leaks, especially when parsing complex data structures. In many cases the evaluated AST is more space efficient than the unevaluaded with a lot of closures.

Minimal complete definition

Nothing

Methods

rwnfA :: WNFData c => a b c -> a b c #

rwnf2A :: WNFData c => a b c -> a b c #

#### Instances

Instances details

ArrowWNF IOLA # |
Instance details Defined in Control.Arrow.IOListArrow Methods rwnfA :: WNFData c => IOLA b c -> IOLA b c # rwnf2A :: WNFData c => IOLA b c -> IOLA b c #
ArrowWNF LA # |
Instance details Defined in Control.Arrow.ListArrow Methods rwnfA :: WNFData c => LA b c -> LA b c # rwnf2A :: WNFData c => LA b c -> LA b c #
ArrowWNF (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods rwnfA :: WNFData c => IOSLA s b c -> IOSLA s b c # rwnf2A :: WNFData c => IOSLA s b c -> IOSLA s b c #
ArrowWNF (SLA s) # |
Instance details Defined in Control.Arrow.StateListArrow Methods rwnfA :: WNFData c => SLA s b c -> SLA s b c # rwnf2A :: WNFData c => SLA s b c -> SLA s b c #