[project @ 1997-10-13 16:12:54 by simonm]
authorsimonm <unknown>
Mon, 13 Oct 1997 16:20:10 +0000 (16:20 +0000)
committersimonm <unknown>
Mon, 13 Oct 1997 16:20:10 +0000 (16:20 +0000)
commitdf10403c92440a304198b3096e65d52a1fe482ae
tree4b03ed5a770264ada6704ffc2ae488f8801b2097
parent25a3b2731ed2cf127495f823892e9ec572a7b30f
[project @ 1997-10-13 16:12:54 by simonm]
Changes to unbox the state in the ST and IO monads.

ST now has type

newtype ST s a = ST (State# s -> STret s a)
data STret s a = STret (State# s) a

IO now has type

newtype IO a = IO (State# RealWorld -> IOResult a)
data IOResult a = IOok   (State# RealWorld) a
                | IOfail (State# RealWorld) IOError

So ST should be slightly more efficient, and IO should be nearly as
efficient as ST.
26 files changed:
ghc/compiler/basicTypes/Unique.lhs
ghc/compiler/deSugar/DsCCall.lhs
ghc/compiler/prelude/PrelInfo.lhs
ghc/compiler/prelude/PrimOp.lhs
ghc/compiler/prelude/TysWiredIn.lhs
ghc/compiler/simplCore/SimplUtils.lhs
ghc/compiler/simplCore/Simplify.lhs
ghc/driver/ghc-asm.lprl
ghc/driver/ghc.lprl
ghc/lib/concurrent/Channel.lhs
ghc/lib/ghc/ArrBase.lhs
ghc/lib/ghc/ConcBase.lhs
ghc/lib/ghc/GHCmain.lhs
ghc/lib/ghc/IOBase.lhs
ghc/lib/ghc/PackBase.lhs
ghc/lib/ghc/STBase.lhs
ghc/lib/ghc/UnsafeST.lhs
ghc/lib/glaExts/Foreign.lhs
ghc/lib/glaExts/ST.lhs
ghc/lib/required/Directory.lhs
ghc/lib/required/IO.lhs
ghc/lib/required/Time.lhs
ghc/runtime/c-as-asm/PerformIO.lhc
ghc/runtime/main/StgStartup.lhc
ghc/runtime/main/Threads.lc
ghc/tests/codeGen/should_run/cg025.stderr