neononempty: NonEmpty lists that look [more, like, this]

[ bsd3, data, library ] [ Propose Tags ]

This package provides NonEmpty, an alternative to the NonEmpty type in base.

It has a few differences from base's NonEmpty:

  • It has Show and Read instance similar to that of normal lists

  • It has a 100% safe API

  • It has a few added/removed/updated functions (see Data.List.NeoNonEmpty's module docs)

  • New functions aren't tied to new versions of GHC/base

The show instance is the original raison d'être. When scanning textual data, the brain can interpret uniformity more quickly. Which do you think is easier to scan?

x :| [y, z]
[x, y, z]

Now imagine this in various fields of a large compound structure, and you have two of them, and you're trying to find the difference.

>>> :set -XOverloadedLists
>>> aNonEmpty [1, 2, 3]
[1,2,3]
>>> read "[1, 2, 3]" :: NonEmpty Int
[1,2,3]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.1.0
Change log CHANGELOG.md
Dependencies base (>=4.9.0.0 && <5), base-compat (<1) [details]
License BSD-3-Clause
Author Owen Shepherd
Maintainer owen@owen.cafe
Category Data
Home page https://github.com/414owen/neononempty
Source repo head: git clone https://github.com/414owen/neononempty.git
Uploaded by 414owen at 2023-11-26T15:18:08Z
Distributions NixOS:1.1.0
Downloads 31 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]