proxied: Make functions consume Proxy instead of undefined
proxied
is a simple library that exports a function to
convert constant functions to ones that take a proxy
value. This is useful for retrofiting typeclasses that
have functions that return a constant value for any value
of a particular type (but still need to consume some
value, since one of the parameterized types must appear
in a typeclass function). Often, these functions are
given undefined
as an argument, which might be
considered poor design.
Proxy
, however, does not carry any of the
error-throwing risks of undefined
, so it is much more
preferable to take Proxy
as an argument to a constant
function instead of undefined
. Unfortunately, Proxy
was included in base
until GHC 7.8, so many of base
's
typeclasses still contain constant functions that aren't
amenable to passing Proxy
. proxied
addresses this
issue by providing variants of those typeclass functions
that take an explicit proxy
value.
[Skip to Readme]
Downloads
- proxied-0.1.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1, 0.1.1, 0.2, 0.3, 0.3.1, 0.3.2 |
---|---|
Change log | CHANGELOG.md |
Dependencies | base (>=4.3 && <5), generic-deriving (>=1.10.1 && <2), tagged (>=0.4.4 && <1) [details] |
Tested with | ghc ==7.0.4, ghc ==7.2.2, ghc ==7.4.2, ghc ==7.6.3, ghc ==7.8.4, ghc ==7.10.3, ghc ==8.0.1 |
License | BSD-3-Clause |
Copyright | (C) 2016 Ryan Scott |
Author | Ryan Scott |
Maintainer | Ryan Scott <ryan.gl.scott@gmail.com> |
Category | Data |
Home page | https://github.com/RyanGlScott/proxied |
Bug tracker | https://github.com/RyanGlScott/proxied/issues |
Source repo | head: git clone https://github.com/RyanGlScott/proxied |
Uploaded | by ryanglscott at 2016-02-18T23:38:47Z |
Distributions | LTSHaskell:0.3.2, NixOS:0.3.2, Stackage:0.3.2 |
Reverse Dependencies | 2 direct, 0 indirect [details] |
Downloads | 4152 total (3 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2016-02-18 [all 1 reports] |