Generalize type of Servant.Types.SourceT.source to any foldable.
This commit is contained in:
parent
1fba9dc604
commit
2c78a06add
1 changed files with 1 additions and 1 deletions
|
@ -212,7 +212,7 @@ instance (QC.Arbitrary a, Monad m) => QC.Arbitrary (StepT m a) where
|
||||||
-- >>> source "foo" :: SourceT Identity Char
|
-- >>> source "foo" :: SourceT Identity Char
|
||||||
-- fromStepT (Effect (Identity (Yield 'f' (Yield 'o' (Yield 'o' Stop)))))
|
-- fromStepT (Effect (Identity (Yield 'f' (Yield 'o' (Yield 'o' Stop)))))
|
||||||
--
|
--
|
||||||
source :: [a] -> SourceT m a
|
source :: Foldable f => f a -> SourceT m a
|
||||||
source = fromStepT . foldr Yield Stop
|
source = fromStepT . foldr Yield Stop
|
||||||
|
|
||||||
-- | Get the answers.
|
-- | Get the answers.
|
||||||
|
|
Loading…
Reference in a new issue