-
Notifications
You must be signed in to change notification settings - Fork 5
/
named.cabal
64 lines (59 loc) · 2.16 KB
/
named.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cabal-version: 2.4
name: named
version: 0.3.0.2
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 :: "from" :! FilePath -> "to" :! FilePath -> IO ()
> createSymLink (Arg from) (Arg to) = ...
>
> main = createSymLink ! #from "/path/to/source"
> ! #to "/target/path"
license: BSD-3-Clause
license-file: LICENSE
author: Vladislav Zavialov
maintainer: Monadfix <[email protected]>
homepage: https://github.com/monadfix/named
bug-reports: https://github.com/monadfix/named/issues
category: Control
build-type: Simple
extra-source-files: ChangeLog.md
tested-with: GHC ==9.4.8, GHC ==9.6.6, GHC ==9.10.1
source-repository head
type: git
location: [email protected]:monadfix/named.git
library
exposed-modules: Named, Named.Internal
build-depends: base >=4.16 && <4.21
hs-source-dirs: src
default-language: GHC2021
ghc-options: -Wall
-fno-warn-unticked-promoted-constructors
test-suite regression
type: exitcode-stdio-1.0
main-is: Test.hs
other-modules: TestImport
build-depends: base >=4.16 && <4.21,
named
hs-source-dirs: test
default-language: GHC2021
ghc-options: -Wall
-fno-warn-missing-signatures