th-lock
Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.Lock

Description

Serial Haskell module compilation

Synopsis

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.