proxied-0.3.1: 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.Proxyless

Contents

Description

Remove the Proxy, Proxy#, and undefined arguments from functions with proxyless, proxyHashless, and undefinedless, respectively, which produce functions that take type information via GHC's -XTypeApplications extension.

This module is only available with GHC 8.0 or later.

Since: 0.2

Synopsis

proxyless, proxyHashless, and undefinedless

proxyless :: forall k (a :: k) b. (Proxy a -> b) -> b Source #

Converts a constant function that takes a Proxy argument to one that doesn't require an argument.

Since: 0.2

proxyHashless :: forall k (a :: k) b. (Proxy# a -> b) -> b Source #

Converts a constant function that takes a Proxy# argument to one that doesn't require an argument.

Since: 0.2

undefinedless :: forall a b. (a -> b) -> b Source #

Converts a constant function that takes an undefined argument to one that doesn't require an argument.

Since: 0.2

Proxyless functions

Data.Bits

theBitSize :: forall a. Bits a => Int Source #

Data.Data

Data.Typeable

theTypeNatTypeRep :: forall a. KnownNat a => TypeRep Source #

theTypeNatTypeRep = proxyHashless typeNatTypeRep

Note that in base-4.10 and later, theTypeNatTypeRep is simply a synonym for theTypeRep, as typeNatTypeRep is no longer exported.

Since: 0.2

theTypeRep :: forall k (a :: k). Typeable a => TypeRep Source #

theTypeRep# :: forall k (a :: k). Typeable a => TypeRep Source #

theTypeRep# = proxyHashless typeRep#

Note that in base-4.10 and later, theTypeRep# is simply a synonym for theTypeRep, as typeRep# is no longer exported.

Since: 0.2

theTypeSymbolTypeRep :: forall a. KnownSymbol a => TypeRep Source #

theTypeSymbolTypeRep = proxyHashless typeSymbolTypeRep

Note that in base-4.10 and later, theTypeSymbolTypeRep is simply a synonym for theTypeRep, as typeSymbolTypeRep is no longer exported.

Since: 0.2

Foreign.Storable

GHC.Generics

theDatatypeName :: forall k (d :: k). Datatype d => [Char] Source #

theModuleName :: forall k (d :: k). Datatype d => [Char] Source #

theIsNewtype :: forall k (d :: k). Datatype d => Bool Source #

thePackageName :: forall k (d :: k). Datatype d => [Char] Source #

theConName :: forall k (c :: k). Constructor c => [Char] Source #

theConFixity :: forall k (c :: k). Constructor c => Fixity Source #

theSelName :: forall k (s :: k). Selector s => [Char] Source #

GHC.OverloadedLabels

theFromLabel :: forall x a. IsLabel x a => a Source #

In base-4.10 and later, this is simply a synonym for fromLabel. In base-4.9, theFromLabel is defined as:

theFromLabel = proxyHashless fromLabel

Since: 0.2

GHC.TypeLits

theSameNat :: forall a b. (KnownNat a, KnownNat b) => Maybe (a :~: b) Source #

Prelude

Text.Printf