 | tagged-0.2.3.1: Provides newtype wrappers for phantom types to avoid unsafely passing dummy arguments | Source code | Contents | Index |
|
Data.Proxy | Portability | generalized newtype deriving | Stability | experimental | Maintainer | Edward Kmett <ekmett@gmail.com> |
|
|
|
|
|
Description |
|
|
Synopsis |
|
|
|
|
Tagged values
|
|
|
Constructors | | Instances | |
|
|
|
Some times you need to change the proxy you have lying around.
Idiomatic usage is to make a new combinator for the relationship
between the proxies that you want to enforce, and define that
combinator using reproxy.
data Succ n
reproxySucc :: Proxy n -> Proxy (Succ n)
reproxySucc = reproxy
|
|
|
asProxyTypeOf is a type-restricted version of const.
It is usually used as an infix operator, and its typing forces its first
argument (which is usually overloaded) to have the same type as the tag
of the second.
|
|
Conversion
|
|
|
Convert from a Tagged representation to a representation
based on a Proxy.
|
|
|
Convert from a representation based on a Proxy to a Tagged
representation.
|
|
Produced by Haddock version 2.6.1 |