The latest version of named is 0.3.0.2-0.

named

Version 0.1.0.0 revision 0 uploaded by Artyom.

Package meta

Synopsis
Named parameters (keyword arguments) for Haskell
Description

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

  • they can be supplied in arbitrary order

  • their names serve as documentation at call site

  • it is impossible to accidentally mix them up

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"
Author
Vladislav Zavialov
Bug reports
n/a
Category
Control
Copyright
n/a
Homepage
n/a
Maintainer
Vladislav Zavialov <vlad.z.4096@gmail.com>
Package URL
n/a
Stability
n/a

Components