Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fumiaki Kinoshita
GHC
Commits
0db1f01c
Commit
0db1f01c
authored
Dec 04, 1997
by
simonm
Browse files
[project @ 1997-12-04 14:55:29 by simonm]
lazify strictToLazyST a bit.
parent
2caf4c69
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/lib/glaExts/LazyST.lhs
View file @
0db1f01c
...
...
@@ -100,8 +100,11 @@ unsafeFreezeSTArray (STArray arr) = strictToLazyST (unsafeFreezeArray arr)
strictToLazyST :: STBase.ST s a -> ST s a
strictToLazyST (STBase.ST m) = ST $ \s ->
let STBase.S# s# = s in
case m s# of { STBase.STret s2# r -> (r, STBase.S# s2#) }
let
STBase.S# s# = s
STBase.STret s2# r = m s#
in
(r, STBase.S# s2#)
lazyToStrictST :: ST s a -> STBase.ST s a
lazyToStrictST (ST m) = STBase.ST $ \s ->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment