plur: Plurality monad: Zero, one, or at least two.

[ bsd3, data, library ] [ Propose Tags ]

Often when counting you don't need an exact count, but only whether there are two things. Two examples:

When searching for inhabitants of a type (implementations of a program), you want to be able to tell whether there are (a) no possible inhabitants, (b) a unique inhabitant, or (c) multiple inhabitants.

When displaying the name of a variable, if there's exactly one variable of a given name ("a") you can just use that name, but if there are multiples you might use a unique id to disambiguate them ("a1" vs "a2").

Versions [faq],
Change log
Dependencies base (>=4.3 && <4.14), semigroups (>=0.18) [details]
License BSD-3-Clause
Copyright (c) 2018-2019 Joel Burget
Author Joel Burget
Category Data
Uploaded by joelb at Tue Feb 12 20:21:43 UTC 2019
Distributions NixOS:
Downloads 251 total (21 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-02-12 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees