projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9520c57
)
Add type signature in local where
author
simonpj@microsoft.com
<unknown>
Tue, 27 Jul 2010 15:15:32 +0000
(15:15 +0000)
committer
simonpj@microsoft.com
<unknown>
Tue, 27 Jul 2010 15:15:32 +0000
(15:15 +0000)
Data/Data.hs
patch
|
blob
|
history
diff --git
a/Data/Data.hs
b/Data/Data.hs
index
78daea0
..
27f42fe
100644
(file)
--- a/
Data/Data.hs
+++ b/
Data/Data.hs
@@
-451,13
+451,16
@@
fromConstrB f = unID . gunfold k z
-- | Monadic variation on 'fromConstrB'
-fromConstrM :: (Monad m, Data a)
+fromConstrM :: forall m a. (Monad m, Data a)
=> (forall d. Data d => m d)
-> Constr
-> m a
fromConstrM f = gunfold k z
where
+ k :: (forall b r. Data b => m (b -> r) -> m r)
k c = do { c' <- c; b <- f; return (c' b) }
+
+ z :: forall r. r -> m r
z = return