Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Haskell.TH.Lock
Description
Serial Haskell module compilation
Synopsis
- ensureSerialCompilation :: (String -> IO ()) -> Q [Dec]
- ensureSerialCompilationQuietly :: Q [Dec]
- ensureSerialCompilationVerbose :: Q [Dec]
Documentation
ensureSerialCompilation :: (String -> IO ()) -> Q [Dec] Source #
Call this function right after import section to prevent concurrent TH code exection for modules with mutable compile time shared state. The function acquires a lock in the scope of GHC process and the lock is released once type checker completes module verification.
ensureSerialCompilationQuietly :: Q [Dec] Source #
ensureSerialCompilation
without lock logging
ensureSerialCompilationVerbose :: Q [Dec] Source #
ensureSerialCompilation
with lock logging