diff --git a/servant/src/Servant/Types/SourceT.hs b/servant/src/Servant/Types/SourceT.hs index 84cb4b6a..d66405c5 100644 --- a/servant/src/Servant/Types/SourceT.hs +++ b/servant/src/Servant/Types/SourceT.hs @@ -212,7 +212,7 @@ instance (QC.Arbitrary a, Monad m) => QC.Arbitrary (StepT m a) where -- >>> source "foo" :: SourceT Identity Char -- 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 -- | Get the answers.