C expressions.
Moduleinline-c-0.9.1.10Haskell2010
Language.C.Inline.Unsafe
unsafe variants of the Language.C.Inline quasi-quoters, to call the C code
unsafely in the sense of
https://www.haskell.org/onlinereport/haskell2010/haskellch8.html#x15-1590008.4.3.
In GHC, unsafe foreign calls are faster than safe foreign calls, but the user
must guarantee the control flow will never enter Haskell code (via a callback
or otherwise) before the call is done.
This module is intended to be imported qualified:
import qualified Language.C.Inline.Unsafe as CU
- 3 values
- Packageinline-c-0.9.1.10
- Exports3
- LanguageHaskell2010
- LicenceMIT
- SourceUnsafe.hs
Variant of exp, for use with expressions known to have no side effects.
BEWARE: Use this function with caution, only when you know what you are doing. If an expression does in fact have side-effects, then indiscriminate use of pure may endanger referential transparency, and in principle even type safety. Also note that the function may run more than once and that it may run in parallel with itself, given that unsafeDupablePerformIO is used to call the provided C code to ensure good performance using the threaded runtime. Please refer to the documentation for unsafeDupablePerformIO for more details.
C code blocks (i.e. statements).