The named package

[ Tags: bsd3, control, library ] [ Propose Tags ]

named is a lightweight library for named function parameters (keyword arguments) based on overloaded labels. Keyword arguments have several advantages over positional arguments:

Unlike newtype wrappers, keyword arguments don't pollute the global namespace, don't require top-level definitions, and don't need to be exported.

This implementation of named parameters is typesafe, provides good type inference, descriptive type errors, and has no runtime overhead.

Example usage:

import Named

createSymLink :: FilePath `Named` "from" -> FilePath `Named` "to" -> IO ()
createSymLink (Named from) (Named to) = ...

main = createSymLink ! #from "/path/to/source"
                     ! #to "/target/path"

Properties

Versions 0.1.0.0
Change log ChangeLog.md
Dependencies base (>=4.9 && <4.12) [details]
License BSD3
Author Vladislav Zavialov
Maintainer Vladislav Zavialov <vlad.z.4096@gmail.com>
Category Control
Uploaded Mon Feb 5 18:08:47 UTC 2018 by Artyom
Distributions NixOS:0.1.0.0
Downloads 23 total (23 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-02-05 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees