text-1.1.1.3: An efficient packed Unicode text type.

Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com
Safe HaskellNone

Data.Text.Internal.Unsafe

Description

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

A module containing unsafe operations, for very very careful use in heavily tested code.

Synopsis

Documentation

inlineInterleaveST :: ST s a -> ST s aSource

Allow an ST computation to be deferred lazily. When passed an action of type ST s a, the action will only be performed when the value of a is demanded.

This function is identical to the normal unsafeInterleaveST, but is inlined and hence faster.

Note: This operation is highly unsafe, as it can introduce externally visible non-determinism into an ST action.

inlinePerformIO :: IO a -> aSource

Just like unsafePerformIO, but we inline it. Big performance gains as it exposes lots of things to further inlining. Very unsafe. In particular, you should do no memory allocation inside an inlinePerformIO block. On Hugs this is just unsafePerformIO.