proxied
Version 0.1.1 revision 0 uploaded by ryanglscott.
Package meta
- Synopsis
- Make functions consume Proxy instead of undefined
- Description
proxied
is a simple library that exports a function to convert constant functions to ones that take aproxy
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 givenundefined
as an argument, which might be considered poor design.Proxy
, however, does not carry any of the error-throwing risks ofundefined
, so it is much more preferable to takeProxy
as an argument to a constant function instead ofundefined
. Unfortunately,Proxy
was included inbase
until GHC 7.8, so many ofbase
's typeclasses still contain constant functions that aren't amenable to passingProxy
.proxied
addresses this issue by providing variants of those typeclass functions that take an explicitproxy
value.- Author
- Ryan Scott
- Bug reports
- https://github.com/RyanGlScott/proxied/issues
- Category
- Data
- Copyright
- (C) 2016 Ryan Scott
- Homepage
- https://github.com/RyanGlScott/proxied
- Maintainer
- Ryan Scott <ryan.gl.scott@gmail.com>
- Package URL
- n/a
- Stability
- Provisional