proxied-0.1: Make functions consume Proxy instead of undefined

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

Data.Proxied

Contents

Description

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

Since: 0.1

Synopsis

proxied and unproxied

proxied :: (a -> b) -> proxy a -> b Source

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

Since: 0.1

unproxied :: (Proxy a -> b) -> a -> b Source

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

bitSizeMaybeProxied :: Bits a => proxy a -> Maybe Int Source

bitSizeMaybeProxied = proxied bitSizeMaybe

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

Since: 0.1

finiteBitSizeProxied :: FiniteBits a => proxy a -> Int Source

finiteBitSizeProxied = proxied finiteBitSize

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

Since: 0.1

Data.Data

Data.Typeable

typeOfProxied :: Typeable a => proxy a -> TypeRep Source

typeOfProxied = proxied typeOf

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

Since: 0.1

Foreign.Storable

GHC.Generics

datatypeNameProxied :: Datatype d => proxy ((t :: * -> (* -> *) -> * -> *) d f a) -> [Char] Source

moduleNameProxied :: Datatype d => proxy ((t :: * -> (* -> *) -> * -> *) d f a) -> [Char] Source

isNewtypeProxied :: Datatype d => proxy ((t :: * -> (* -> *) -> * -> *) d f a) -> Bool Source

isNewtypeProxied = proxied isNewtype

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

Since: 0.1

conNameProxied :: Constructor c => proxy ((t :: * -> (* -> *) -> * -> *) c f a) -> [Char] Source

conFixityProxied :: Constructor c => proxy ((t :: * -> (* -> *) -> * -> *) c f a) -> Fixity Source

conIsRecordProxied :: Constructor c => proxy ((t :: * -> (* -> *) -> * -> *) c f a) -> Bool Source

selNameProxied :: Selector s => proxy ((t :: * -> (* -> *) -> * -> *) s f a) -> [Char] Source

Prelude

Text.Printf

parseFormatProxied :: PrintfArg a => proxy a -> ModifierParser Source

parseFormatProxied = proxied parseFormat

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

Since: 0.1