[web-devel] wai and warp for conduit

Michael Snoyman michael at snoyman.com
Fri Jan 13 10:34:53 CET 2012


I went for sourceNull as a parallel to sinkNull. As Felipe points out,
sinkNull makes a lot of sense since it was named after /dev/null. I
don't really have any strong naming opinions here, especially since I
would recommend people stick with mempty anyway.

On Fri, Jan 13, 2012 at 10:06 AM, Jasper Van der Jeugt <m at jaspervdj.be> wrote:
> I'd like to add that sourceNull is a rather confusing name, and
> sourceEmpty would be more consistent with the other libraries out
> there.
>
> See e.g.
>
>    Data.Map.null :: Map k a -> Bool
>    Data.Map.empty :: Map k a
>
> Cheers,
> Jasper
>
> On Fri, Jan 13, 2012 at 7:57 AM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
>>> For the nullSource, you can actually use mempty, since Source is an
>>> instance of Monoid. I realize now that I didn't even think about this
>>> when I was writing http-conduit, and instead used `sourceList []` in a
>>> few places. I think in conduit 0.0.4 I'll include
>>> Data.Conduit.List.sourceNull, with a comment that it's just a
>>> type-restricted synonym for mempty. Sound good?
>>
>> Yes, sounds great. Thank you.
>>
>> --Kazu
>>
>> _______________________________________________
>> web-devel mailing list
>> web-devel at haskell.org
>> http://www.haskell.org/mailman/listinfo/web-devel
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel



More information about the web-devel mailing list