@@ -187,20 +187,13 @@ instance FramingUnrender NoFraming where
187-- NewlineFraming
187-- NewlineFraming
188-------------------------------------------------------------------------------
188-------------------------------------------------------------------------------
190−-- | A simple framing strategy that has no header or termination, and inserts a
190+-- | A simple framing strategy that has no header, and inserts a
191−-- newline character between each frame. This assumes that it is used with a
191+-- newline character after each frame. This assumes that it is used with a
192-- Content-Type that encodes without newlines (e.g. JSON).
192-- Content-Type that encodes without newlines (e.g. JSON).
193data NewlineFraming
193data NewlineFraming
195instance FramingRender NewlineFraming where
195instance FramingRender NewlineFraming where
196− framingRender _ f = mapStepT go0 where
196+ framingRender _ f = fmap (\x -> f x <> "\n")
198− go0 (Error err) = Error err
199− go0 (Skip s) = Skip (go0 s)
200− go0 (Yield x s) = Yield (f x) (go s)
201− go0 (Effect ms) = Effect (fmap go0 ms)
203− go = fmap (\x -> "\n" <> f x)
205instance FramingUnrender NewlineFraming where
198instance FramingUnrender NewlineFraming where
206 framingUnrender _ f = transformWithAtto $ do
199 framingUnrender _ f = transformWithAtto $ do