lvish-1.1.4: Parallel scheduler, LVar data structures, and infrastructure to build more.

Safe HaskellUnsafe
LanguageHaskell98

Control.LVish.DeepFrz.Internal

Description

This module is not Safe Haskell, but it must be used to create new LVar types.

Synopsis

Documentation

class DeepFrz a where Source

DeepFreezing is a type-level (guaranteed O(1) time complexity) operation. It marks an LVar and its contents (recursively) as frozen. DeepFreezing is not an action that can be taken directly by the user, however. Rather, it is the final step in a runParThenFreeze invocation.

Minimal complete definition

Nothing

Associated Types

type FrzType a :: * Source

This type function is public. It maps pre-frozen types to frozen ones. It should be idempotent.

Methods

frz :: a -> FrzType a Source

Private: not exported to the end user.

Instances

DeepFrz Bool 
DeepFrz Char 
DeepFrz Double 
DeepFrz Float 
DeepFrz Int 
DeepFrz Int8 
DeepFrz Int16 
DeepFrz Int32 
DeepFrz Int64 
DeepFrz Integer 
DeepFrz Ordering 
DeepFrz Word 
DeepFrz Word8 
DeepFrz Word16 
DeepFrz Word32 
DeepFrz Word64 
DeepFrz () 
DeepFrz a => DeepFrz [a] 
DeepFrz a => DeepFrz (Maybe a) 
(DeepFrz a, DeepFrz b) => DeepFrz (Either a b) 
(DeepFrz a, DeepFrz b) => DeepFrz (a, b) 
DeepFrz a => DeepFrz (IVar s a) 
DeepFrz a => DeepFrz (IStructure s a) 
DeepFrz a => DeepFrz (ISet s a) 
DeepFrz a => DeepFrz (ISet s a) 
DeepFrz a => DeepFrz (PureLVar s a) 
(DeepFrz a, DeepFrz b, DeepFrz c) => DeepFrz (a, b, c) 
DeepFrz a => DeepFrz (IMap k s a) 
DeepFrz a => DeepFrz (SatMap k s a) 
DeepFrz a => DeepFrz (IMap k s a) 
(DeepFrz a, DeepFrz b, DeepFrz c, DeepFrz d) => DeepFrz (a, b, c, d) 
(DeepFrz a, DeepFrz b, DeepFrz c, DeepFrz d, DeepFrz e) => DeepFrz (a, b, c, d, e) 
(DeepFrz a, DeepFrz b, DeepFrz c, DeepFrz d, DeepFrz e, DeepFrz f) => DeepFrz (a, b, c, d, e, f) 
(DeepFrz a, DeepFrz b, DeepFrz c, DeepFrz d, DeepFrz e, DeepFrz f, DeepFrz g) => DeepFrz (a, b, c, d, e, f, g) 
(DeepFrz a, DeepFrz b, DeepFrz c, DeepFrz d, DeepFrz e, DeepFrz f, DeepFrz g, DeepFrz h) => DeepFrz (a, b, c, d, e, f, g, h) 
(DeepFrz a, DeepFrz b, DeepFrz c, DeepFrz d, DeepFrz e, DeepFrz f, DeepFrz g, DeepFrz h, DeepFrz i) => DeepFrz (a, b, c, d, e, f, g, h, i) 

data NonFrzn Source

This exists only for the purpose of being a type which is not equal to Frzn. One could just as well have used (), but this is more descriptive.

data Frzn Source

An uninhabited type that signals that an LVar has been frozen. LVars should use this in place of their s parameter.

Instances

Foldable (IStructure Frzn) 
Foldable (ISet Frzn) 
Foldable (ISet Frzn) 
Show a => Show (IVar Frzn a) 
Show a => Show (IStructure Frzn a) 
Show a => Show (ISet Frzn a) 
Show a => Show (ISet Frzn a) 
Show a => Show (PureLVar Frzn a) 
Foldable (IMap k Frzn) 
Foldable (SatMap k Frzn)

As with all LVars, after freezing, map elements can be consumed. In the case of this SatMap implementation, it need only be Frzn, not Trvrsbl.

Foldable (IMap k Frzn) 
(Show k, Show a) => Show (IMap k Frzn a) 
(Show k, Show a) => Show (SatMap k Frzn a) 
(Show k, Show a) => Show (IMap k Frzn a) 

data Trvrsbl Source

An uninhabited type that signals that an LVar is not only frozen, but it may be traversed in whatever order its internal representation dictates.

Instances

Foldable (IVar Trvrsbl) 
Foldable (IStructure Trvrsbl) 
Foldable (ISet Trvrsbl) 
Foldable (ISet Trvrsbl) 
Show a => Show (IVar Trvrsbl a)

For convenience only; the user could define this.

Show a => Show (IStructure Trvrsbl a)

For convenience only; the user could define this.

Show a => Show (ISet Trvrsbl a)

For convenience; the user could define this.

Show a => Show (ISet Trvrsbl a)

For convenience only; the user could define this.

Foldable (IMap k Trvrsbl) 
Foldable (SatMap k Trvrsbl) 
Foldable (IMap k Trvrsbl) 
(Show k, Show a) => Show (IMap k Trvrsbl a)

For convenience only; the user could define this.

(Show k, Show a) => Show (SatMap k Trvrsbl a)

For convenience only; the user could define this.

(Show k, Show a) => Show (IMap k Trvrsbl a)

For convenience only; the user could define this.