newtype-zoo: Newtype Wrapper Zoo

[ bsd3, data, library ] [ Propose Tags ]
Versions [RSS] 1.0.0.0, 1.0.0.1, 1.1.0.0, 1.2.0.0, 1.2.1.0
Change log CHANGELOG.md
Dependencies base (>=4.12.0.0 && <4.13), data-default, deepseq, pointed, profunctors, QuickCheck, random [details]
License BSD-3-Clause
Author Sven Heyll
Maintainer sven.heyll@gmail.com
Category Data
Home page https://github.com/sheyll/newtype-zoo
Uploaded by SvenHeyll at 2019-09-19T15:32:02Z
Distributions NixOS:1.2.1.0
Downloads 1705 total (19 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2019-09-19 [all 1 reports]

Readme for newtype-zoo-1.0.0.1

[back to package description]

General Purpose Newtype Wrappers

A zoo of newtype wrappers.

In everyday Haskell programming newtype wrappers occur again and again, to convey some extra meaning for the maintainer of the code, and to prevent mixing up parameters to functions with the same type.

For example:

applyConfiguration :: MyConfig -> MyConfig -> IO MyConfig

What the user actually wanted to express was:

applyConfiguration :: Wanted MyConfig -> Current MyConfig -> IO (Active MyConfig)

This simple library contains a list of simple newtype wrappers:

They live in the sub directory NewtypeZoo, e.g. NewtypeZoo.Active.