Add type signature in local where
authorsimonpj@microsoft.com <unknown>
Tue, 27 Jul 2010 15:15:32 +0000 (15:15 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 27 Jul 2010 15:15:32 +0000 (15:15 +0000)
Data/Data.hs

index 78daea0..27f42fe 100644 (file)
@@ -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