Proposal: Add NonEmpty constructors to the Prelude

Henning Thielemann lemming at
Thu Jan 5 22:10:46 UTC 2017

On Thu, 5 Jan 2017, Ganesh Sittampalam wrote:

> -1 : I'm against this because NonEmpty is a special case of "lists with
> at least n elements", and n=1 doesn't feel like a particuar sweet spot.
> Once people are using NonEmpty everywhere, won't they need at least 2
> elements when using tail to get a NonEmpty, etc?

Btw. my non-empty package provides a NonEmpty constructor that can be 
nested, such that you can have lists with at least two elements.

More information about the Libraries mailing list