| License | BSD-style (see the LICENSE file in the distribution) |
|---|---|
| Maintainer | libraries@haskell.org |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Data.Proxy
Description
Definition of a Proxy type (poly-kinded in GHC)
Since: 4.7.0.0
Documentation
A concrete, poly-kinded proxy type
Constructors
| Proxy |
Instances
| Monad (Proxy (TYPE Lifted)) | |
| Functor (Proxy (TYPE Lifted)) | |
| Applicative (Proxy (TYPE Lifted)) | |
| Foldable (Proxy (TYPE Lifted)) | |
| Traversable (Proxy (TYPE Lifted)) | |
| Generic1 (Proxy *) | |
| Bounded (Proxy k s) | |
| Enum (Proxy k s) | |
| Eq (Proxy k s) | |
| Data t => Data (Proxy (TYPE Lifted) t) | |
| Ord (Proxy k s) | |
| Read (Proxy k s) | |
| Show (Proxy k s) | |
| Ix (Proxy k s) | |
| Generic (Proxy k t) | |
| Semigroup (Proxy k s) | |
| Monoid (Proxy k s) | |
| type Rep1 (Proxy k) = D1 (MetaData "Proxy" "Data.Proxy" "base" False) (C1 (MetaCons "Proxy" PrefixI False) U1) | |
| type Rep (Proxy k t) = D1 (MetaData "Proxy" "Data.Proxy" "base" False) (C1 (MetaCons "Proxy" PrefixI False) U1) | |
asProxyTypeOf :: a -> Proxy a -> a Source
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.