strict-types-0.1.0.2: A type level predicate ranging over strict types

Safe HaskellNone
LanguageHaskell2010

Type.Strict

Description

Type constraints and patterns for strict types.

Synopsis

Documentation

type family Strict (d :: *) :: Constraint where ... Source #

A closed predicate that is satisfied only by strict types.

A type T is strict if

∀x :: T . rnf x = ⊥ <=> rwhnf x = ⊥

Requires undecidable instances. Mutually recursive groups of types not yet supported.

Equations

Strict Char = () 
Strict Double = () 
Strict Int = () 
Strict Integer = () 
Strict Word = () 
Strict ByteString = () 
Strict Text = () 
Strict String = () 
Strict (Hashed a) = Strict a 
Strict (UArray ix v) = () 
Strict (StorableArray ix v) = () 
Strict (Map k v) = (Strict k, Strict v) 
Strict (HashMap k v) = (Strict k, Strict v) 
Strict (Set k) = Strict k 
Strict (HashSet k) = Strict k 
Strict (Vector a) = () 
Strict (MVector s a) = () 
Strict (Vector a) = () 
Strict (MVector s a) = () 
Strict (Vector a) = () 
Strict (MVector s a) = () 
Strict d = StrictRep d (Rep d) 

pattern IsStrict :: forall a. Strict a => a -> a Source #

A pattern that matches strict types