projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[project @ 1998-03-20 09:42:30 by sof]
[ghc-hetmet.git]
/
ghc
/
lib
/
std
/
PrelST.lhs
diff --git
a/ghc/lib/std/PrelST.lhs
b/ghc/lib/std/PrelST.lhs
index
b3b5411
..
8513a6a
100644
(file)
--- a/
ghc/lib/std/PrelST.lhs
+++ b/
ghc/lib/std/PrelST.lhs
@@
-27,6
+27,11
@@
newtype ST s a = ST (State# s -> STret s a)
data STret s a = STret (State# s) a
+instance Functor (ST s) where
+ map f (ST m) = ST $ \ s ->
+ case (m s) of { STret new_s r ->
+ STret new_s (f r) }
+
instance Monad (ST s) where
{-# INLINE return #-}
{-# INLINE (>>) #-}