diff options
author | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-07-03 18:23:54 -0500 |
---|---|---|
committer | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-07-03 18:23:54 -0500 |
commit | 163de25813d12764aa5ded1666af7c06fee0d67e (patch) | |
tree | 7e1a2f5684f1d5edc55608af5209bc932cee1000 /compiler/utils/FastString.lhs | |
parent | a5b7ee5fc26ac322e7dc79de96e478cde819640c (diff) | |
download | haskell-163de25813d12764aa5ded1666af7c06fee0d67e.tar.gz |
include FastString.string_table in CoreMonad.reinitializeGlobals
Diffstat (limited to 'compiler/utils/FastString.lhs')
-rw-r--r-- | compiler/utils/FastString.lhs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs index 36b1b1e63e..0bdf0a04c4 100644 --- a/compiler/utils/FastString.lhs +++ b/compiler/utils/FastString.lhs @@ -91,7 +91,10 @@ module FastString unpackLitString, -- ** Operations - lengthLS + lengthLS, + + -- * Saving/restoring globals + saveFSTable, restoreFSTable, FastStringTable ) where #include "HsVersions.h" @@ -573,4 +576,14 @@ fsLit x = mkFastString x forall x . sLit (unpackCString# x) = mkLitString# x #-} {-# RULES "fslit" forall x . fsLit (unpackCString# x) = mkFastString# x #-} + + +-------------------- +-- for plugins; see Note [Initializing globals] in CoreMonad + +saveFSTable :: IO FastStringTable +saveFSTable = readIORef string_table + +restoreFSTable :: FastStringTable -> IO () +restoreFSTable = writeIORef string_table \end{code} |