diff options
Diffstat (limited to 'ghc/compiler/utils/SST.lhs')
-rw-r--r-- | ghc/compiler/utils/SST.lhs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ghc/compiler/utils/SST.lhs b/ghc/compiler/utils/SST.lhs index 4c4cbb4996..e574a842e6 100644 --- a/ghc/compiler/utils/SST.lhs +++ b/ghc/compiler/utils/SST.lhs @@ -11,6 +11,7 @@ module SST( thenSST, thenSST_, returnSST, fixSST, thenFSST, thenFSST_, returnFSST, failFSST, recoverFSST, recoverSST, fixFSST, + unsafeInterleaveSST, newMutVarSST, readMutVarSST, writeMutVarSST #if __GLASGOW_HASKELL__ >= 200 @@ -70,6 +71,11 @@ stToSST st s runSST :: SST REAL_WORLD r -> r runSST m = case m realWorld# of SST_R r s -> r +unsafeInterleaveSST :: SST s r -> SST s r +unsafeInterleaveSST m s = SST_R r s -- Duplicates the state! + where + SST_R r _ = m s + returnSST :: r -> SST s r thenSST :: SST s r -> (r -> State# s -> b) -> State# s -> b thenSST_ :: SST s r -> (State# s -> b) -> State# s -> b |