newtype-zoo-1.2.1.0: Newtype Wrapper Zoo
Safe HaskellNone
LanguageHaskell2010

NewtypeZoo

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)

Documentation