Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

hackage.haskell.org : pa-label

[Index] [Quick Jump] Package maintainers For package maintainers and hackage trustees Candidates One-module library to provide nice anonymous labelled tuples and enums. If you have a function: what do you do? At call-site you don’t see the names of any of the types. Before GHC 9.2, one strategy would have been to create a newtype for every single argument: but that is very verbose and leaks into global scope! Instead, do this: then it becomes clear to the call-site, what to do. In the function you can access the labels with record dots to get to the inner types, e.g. username.username, read.read. Even better, you can bundle things into anonymous tuples: and access inside the function like user.username or permission.read. So much nicer! We provide tuples up to size 3, for anything bigger the you should really just create a normal record with data. The great thing is that no use-site has to be adjusted as long as you name the record fields the same and use record-dot syntax everywhere. There’s some experimental support for anonymous enums (E2/E3), they are useful in some situations, but not as often as anonymous tuples in our experience. Approaches like vinyl or superrecord are more general, but very hard to understand and lead to bad error messages. We have found that in practice it is nicer to use the a lot less magical and slightly more verbose T2/T3 and switch to normal records once you reach 4 fields.

Registry - Source - JSON
purl: pkg:hackage/pa-label
Keywords: bsd3, data, library, possehl-analytics
License: BSD-3-Clause
Latest release: 3 months ago
First release: about 1 year ago
Dependent packages: 1
Downloads: 100 total
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 19 days ago

pa-json 0.3.0.0
The interface of aeson is unfortunately extremely … suboptimal. Here’s some wrappers trying to im...
6 versions - Latest release: 8 months ago - 180 downloads total - 0 stars on GitHub - 1 maintainer
pa-field-parser 0.3.0.0
[Index] [Quick Jump] Package maintainers For package maintainers and hackage trustees Candid...
5 versions - Latest release: 8 months ago - 1 dependent package - 140 downloads total - 0 stars on GitHub - 1 maintainer
pa-prelude 0.2.0.0
A prelude to be used in addition to base’s Prelude
2 versions - Latest release: 8 months ago - 5 dependent packages - 64 downloads total - 0 stars on GitHub - 1 maintainer
pa-run-command 0.1.0.0
[Index] [Quick Jump] Package maintainers For package maintainers and hackage trustees Candid...
1 version - Latest release: 12 months ago - 47 downloads total - 0 stars on GitHub - 1 maintainer
pa-pretty 0.1.1.0
[Index] [Quick Jump] Package maintainers For package maintainers and hackage trustees Candid...
2 versions - Latest release: almost 1 year ago - 75 downloads total - 0 stars on GitHub - 1 maintainer
pa-error-tree 0.1.0.0
[Index] [Quick Jump] Package maintainers For package maintainers and hackage trustees Candid...
1 version - Latest release: about 1 year ago - 2 dependent packages - 52 downloads total - 0 stars on GitHub - 1 maintainer