proxied-0.3: Make functions consume Proxy instead of undefined

Copyright(C) 2016-2017 Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
StabilityProvisional
PortabilityGHC
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Proxied

Contents

Description

Convert undefined-consuming functions to Proxy-consuming ones with proxied.

Since: 0.1

Synopsis

proxied and unproxied

proxied :: forall proxy a b. (a -> b) -> proxy a -> b #

Converts a constant function to one that takes a proxy argument.

Since: 0.1

proxyHashed :: forall a b. (a -> b) -> Proxy# a -> b #

Converts a constant function to one that takes a Proxy# argument. This function is only available with base-4.7 or later.

Since: 0.2

unproxied :: forall a b. (Proxy a -> b) -> a -> b #

Converts a constant function that takes a Proxy argument to one that doesn't require a proxy argument. (I'm not sure why you'd want this, but it's here for symmetry.)

Since: 0.1

module Data.Proxy

Proxified functions

Data.Bits

bitSizeProxied :: forall proxy a. Bits a => proxy a -> Int #

isSignedProxied :: forall proxy a. Bits a => proxy a -> Bool #

bitSizeMaybeProxied :: forall proxy a. Bits a => proxy a -> Maybe Int #

bitSizeMaybeProxied = proxied bitSizeMaybe

This function is only available with base-4.7 or later.

Since: 0.1

finiteBitSizeProxied :: forall proxy a. FiniteBits a => proxy a -> Int #

finiteBitSizeProxied = proxied finiteBitSize

This function is only available with base-4.7 or later.

Since: 0.1

Data.Data

dataTypeOfProxied :: forall proxy a. Data a => proxy a -> DataType #

Data.Typeable

typeOfProxied :: forall proxy (a :: k). Typeable a => proxy a -> TypeRep #

typeOfProxied = proxied typeOf

On base-4.7 and later, this is identical to typeRep.

Since: 0.1

Foreign.Storable

sizeOfProxied :: forall proxy a. Storable a => proxy a -> Int #

alignmentProxied :: forall proxy a. Storable a => proxy a -> Int #

GHC.Generics

datatypeNameProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) d f a. Datatype d => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) d f a) -> [Char] #

moduleNameProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) d f a. Datatype d => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) d f a) -> [Char] #

isNewtypeProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) d f a. Datatype d => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) d f a) -> Bool #

isNewtypeProxied = proxied isNewtype

This function is only available with base-4.7 or later.

Since: 0.1

packageNameProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) d f a. Datatype d => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) d f a) -> [Char] #

packageNameProxied = proxied packageName

This function is only avaiable with base-4.9 or later.

Since: 0.1

conNameProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) c f a. Constructor c => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) c f a) -> [Char] #

conFixityProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) c f a. Constructor c => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) c f a) -> Fixity #

conIsRecordProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) c f a. Constructor c => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) c f a) -> Bool #

selNameProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) s f a. Selector s => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) s f a) -> [Char] #

selSourceUnpackednessProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) s f a. Selector s => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) s f a) -> SourceUnpackedness #

selSourceUnpackednessProxied = proxied selSourceUnpackedness

This function is only available with base-4.9 or later.

Since: 0.1

selSourceStrictnessProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) s f a. Selector s => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) s f a) -> SourceStrictness #

selSourceStrictnessProxied = proxied selSourceStrictness

This function is only available with base-4.9 or later.

Since: 0.1

selDecidedStrictnessProxied :: forall proxy (t :: k1 -> (k2 -> *) -> k2 -> *) s f a. Selector s => proxy ((t :: k1 -> (k2 -> *) -> k2 -> *) s f a) -> DecidedStrictness #

selDecidedStrictnessProxied = proxied selDecidedStrictness

This function is only available with base-4.9 or later.

Since: 0.1

Prelude

floatRadixProxied :: forall proxy a. RealFloat a => proxy a -> Integer #

floatDigitsProxied :: forall proxy a. RealFloat a => proxy a -> Int #

floatRangeProxied :: forall proxy a. RealFloat a => proxy a -> (Int, Int) #

Text.Printf

parseFormatProxied :: forall proxy a. PrintfArg a => proxy a -> ModifierParser #

parseFormatProxied = proxied parseFormat

This function is only available with base-4.7 or later.

Since: 0.1