Skip to content
Snippets Groups Projects
Commit df10403c authored by Simon Marlow's avatar Simon Marlow
Browse files

[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.
parent 25a3b273
No related merge requests found
Showing
with 219 additions and 242 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment