Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
dd52974e
Commit
dd52974e
authored
26 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-01-24 14:44:00 by sof]
Moved ST <--> IO coercion functions from IOExts to ST (and LazyST) docs.
parent
447a6fee
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/docs/libraries/IOExts.sgml
+0
-8
0 additions, 8 deletions
ghc/docs/libraries/IOExts.sgml
ghc/docs/libraries/ST.sgml
+9
-6
9 additions, 6 deletions
ghc/docs/libraries/ST.sgml
with
9 additions
and
14 deletions
ghc/docs/libraries/IOExts.sgml
+
0
−
8
View file @
dd52974e
...
...
@@ -58,12 +58,6 @@ simplified memoisation function:
> return a
</verb></tscreen>
<item>
Operations for coercing an <tt/ST/ action into an <tt/IO/ one, and
vice versa are also provided. Notice that coercing an <tt/IO/ action
into an <tt/ST/ action is 'lossy', since any exception raised within the
<tt/IO/ action will not be caught within the <tt/ST/ monad, as it
doesn't support (monadic) exceptions.
</itemize>
<tscreen><verb>
...
...
@@ -98,7 +92,5 @@ performGC :: IO ()
trace :: String -> a -> a
unsafePtrEq :: a -> a -> Bool
unsafeIOToST :: IO a -> ST s a
stToIO :: ST s a -> IO a
</verb></tscreen>
This diff is collapsed.
Click to expand it.
ghc/docs/libraries/ST.sgml
+
9
−
6
View file @
dd52974e
...
...
@@ -37,6 +37,9 @@ thawSTArray :: Ix ix => Array ix elt -> ST s (STArray s ix elt)
freezeSTArray :: Ix ix => STArray s ix elt -> ST s (Array ix elt)
unsafeFreezeSTArray :: Ix ix => STArray s ix elt -> ST s (Array ix elt)
instance Eq (STArray s ix elt)
unsafeIOToST :: IO a -> ST s a
stToIO :: ST s a -> IO a
</verb></tscreen>
Notes:
...
...
@@ -53,12 +56,6 @@ operation <tt/unsafeFreezeSTArray/ is a faster version of
<tt/freezeSTArray/ which omits the copying step. It's a safe substitute for
<tt/freezeSTArray/ if you don't modify the mutable array after freezing it.
<item>
In the current version of Hugs, the <tt/<idx/runST// operation,
used to specify encapsulation, is implemented as a language construct,
and <tt/runST/ is treated as a keyword. We plan to change this to match
GHC soon.
<!--
<item>
Note that it is possible to install Hugs 1.4 without support for lazy
...
...
@@ -76,4 +73,10 @@ places where it matters. GHC implements LazyST and ST using different
types, so this isn't possible.
</item>
<item>
Operations for coercing an <tt/ST/ action into an <tt/IO/ one, and
vice versa are also provided. Notice that coercing an <tt/IO/ action
into an <tt/ST/ action is 'lossy', since any exception raised within the
<tt/IO/ action will not be caught within the <tt/ST/ monad, as it
doesn't support (monadic) exceptions.
</itemize>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment