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

Safe HaskellNone
LanguageHaskell2010

Type.Strict

Description

Type constraints and patterns for strict types.

Synopsis

Documentation

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

A pattern that matches Strict types only

pattern Rnf :: forall a. NFData a => a -> a Source #

A pattern that matches NFData types only and forces values to rigid normal form

type family Strict a :: Constraint where ... Source #

A constraint that is satisfied only by strict types.

A type T is strict if

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

Mutually recursive types are experimentally supported but non regular types are not.

Equations

Strict d = StrictType '[d] d 

class StrictType seen a Source #

An empty class to constrain strict types. An instance is an unchecked promise that a type is fully strict. No instances are needed for generic non-nested datatypes.

Define an instance as follows:

instance StrictType seen Foo

Instances

StrictRep ((:) * d seen) (Rep d) => StrictType * seen d Source # 
StrictType * seen Text Source # 
StrictType * seen ByteString Source # 
StrictType * seen Word64 Source # 
StrictType * seen Word32 Source # 
StrictType * seen Word16 Source # 
StrictType * seen Word8 Source # 
StrictType * seen Word Source # 
StrictType * seen Integer Source # 
StrictType * seen Int64 Source # 
StrictType * seen Int32 Source # 
StrictType * seen Int16 Source # 
StrictType * seen Int8 Source # 
StrictType * seen Int Source # 
StrictType * seen Double Source # 
StrictType * seen Char Source # 
StrictType * seen (Vector a) Source # 
StrictType * seen (Vector a) Source # 
StrictType * seen (Vector a) Source # 
StrictType * seen k => StrictType * seen (HashSet k) Source # 
StrictType * seen k => StrictType * seen (Set k) Source # 
StrictType * seen a => StrictType * seen (Hashed a) Source # 
StrictType * seen (Forced a) Source # 
StrictType * seen (MVector s a) Source # 
StrictType * seen (MVector s a) Source # 
StrictType * seen (MVector s a) Source # 
StrictType * seen (StorableArray ix v) Source # 
StrictType * seen (UArray ix v) Source # 
(StrictType * seen k, StrictType * seen v) => StrictType * seen (HashMap k v) Source #