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
/
exts
/
LazyST.lhs
diff --git
a/ghc/lib/exts/LazyST.lhs
b/ghc/lib/exts/LazyST.lhs
index
1d9cf60
..
29c7814
100644
(file)
--- a/
ghc/lib/exts/LazyST.lhs
+++ b/
ghc/lib/exts/LazyST.lhs
@@
-39,6
+39,14
@@
import PrelGHC
newtype ST s a = ST (PrelST.State s -> (a,PrelST.State s))
+instance Functor (ST s) where
+ map f m = ST $ \ s ->
+ let
+ ST m_a = m
+ (r,new_s) = m_a s
+ in
+ (f r,new_s)
+
instance Monad (ST s) where
return a = ST $ \ s -> (a,s)