unsafe -package:base package:text

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.
A module containing unsafe Text operations, for very very careful use in heavily tested code.
Freeze a mutable array. Do not mutate the MArray afterwards!
Unchecked read of an immutable array. May return garbage or crash on an out-of-bounds access.
Unchecked write of a mutable array. May return garbage or crash on an out-of-bounds access.
O(n) Copy a Text to an array. The array is assumed to be big enough to hold the contents of the entire Text.
Copy a ByteString. Unsafe: This may not be valid UTF-8 text.
Unsafe: This may not be valid UTF-8 text.
Write a character into the array at the given offset. Returns the number of Word8s written.
This version of unsafePerformIO is more efficient because it omits the check that the IO is only being performed by a single thread. Hence, when you use unsafeDupablePerformIO, there is a possibility that the IO action may be performed multiple times (on a multiprocessor), and you should therefore ensure that it gives the same results each time. It may even happen that one of the duplicated IO actions is only run partially, and then interrupted in the middle without an exception being raised. Therefore, functions like bracket cannot be used safely within unsafeDupablePerformIO.
O(1) A variant of head for non-empty Text. unsafeHead omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the Text is non-empty.
O(1) A variant of tail for non-empty Text. unsafeTail omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the Text is non-empty.