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.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 #

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 #

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 #

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 #

theIsSigned :: forall a. Bits a => Bool #

Data.Data

Data.Typeable

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

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 #

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

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 #

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

theSizeOf :: forall a. Storable a => Int #

GHC.Generics

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

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

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

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

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

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

theConIsRecord :: forall k (c :: k). Constructor c => Bool #

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

GHC.OverloadedLabels

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

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

theNatVal :: forall n. KnownNat n => Integer #

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

theSomeNat :: forall n. KnownNat n => SomeNat #

Prelude

Text.Printf