Add some missing type constraints.

These were tripping GHC 6.8's monomorphism restriction warning.
This commit is contained in:
Adam Sampson 2008-05-26 17:41:38 +00:00
parent 8b3eba594d
commit 397ba6a3f5

View File

@ -84,9 +84,11 @@ extOpS ops f
-- | Generate an operation that applies a 'TransformM' with automatic
-- depth-first descent.
makeDepth :: (Monad m, Data t) => OpsM m -> TransformM m t -> TransformM m t
makeDepth :: forall m t. (Monad m, Data t) =>
OpsM m -> TransformM m t -> TransformM m t
makeDepth ops f v = descend v >>= f
where
descend :: DescendM m
descend = makeDescend ops
-- | Add a 'TransformM' to a set, to be applied with automatic depth-first
@ -104,9 +106,11 @@ extOpSD ops ops0 f = ops `extOpS` (makeDepth ops0 f)
-- | Generate an operation that applies a 'CheckM' with automatic
-- depth-first descent.
makeCheck :: (Monad m, Data t) => OpsM m -> CheckM m t -> TransformM m t
makeCheck :: forall m t. (Monad m, Data t) =>
OpsM m -> CheckM m t -> TransformM m t
makeCheck ops f v = descend v >> f v >> return v
where
descend :: DescendM m
descend = makeDescend ops
-- | Add a 'CheckM' to a set, to be applied with automatic depth-first descent.