Common config and debugging functions. Imported by most modules.
- debugCritical :: Bool
- debug :: Bool
- tracePrimEnabled :: Bool
- check :: String -> Int -> Int -> a -> a
- checkCritical :: String -> Int -> Int -> a -> a
- checkLen :: String -> Int -> Int -> a -> a
- checkSlice :: String -> Int -> Int -> Int -> a -> a
- checkEq :: (Eq a, Show a) => String -> String -> a -> a -> b -> b
- checkNotEmpty :: String -> Int -> a -> a
- uninitialised :: String -> a
- type Tag = Int
- tagToInt :: Tag -> Int
- intToTag :: Int -> Tag
- fromBool :: Bool -> Tag
- toBool :: Tag -> Bool
- newtype ST s a = ST (STRep s a)
- runST :: (forall s. ST s a) -> a
Enable internal consistency checks for operations that could corrupt the heap.
Enable internal consistency checks.
This is NOT implied by
debugCritical above. If you want both
you need to set both to `True.`
Print tracing information for each flat array primitive to console. The tracing hooks are in `dph-prim-par:Data.Array.Parallel.Unlifted`
This version is used to check operations that could corrupt the heap.
Throw an error saying something was not intitialised.
String must contain a helpful message saying what module
the error occured in, and the possible reasons for it.
If not then a puppy dies at compile time.
Data constructor rags
Given a value of an algebraic type, the tag tells us what data constructor was used to create it.
ST monad re-exported from GHC
newtype ST s a
The strict state-transformer monad.
A computation of type
transforms an internal state indexed
ST s a
s, and returns a value of type
s parameter is either
- an uninstantiated type variable (inside invocations of
RealWorld(inside invocations of
runST(writeSTRef _|_ v >>= f) = _|_
|ST (STRep s a)|