type-hint-0.1: Guide type inference with proxy values

Safe HaskellNone
LanguageHaskell2010

Type.Hint

Contents

Description

This module provides Proxy values for various types from the base library and functions to use these values as hints for type inference.

Synopsis

Hinting functions

hintType :: α -> p α -> α infixl 1 Source

Hint the type system about the type.

hintType1 :: f α -> p f -> f α infixl 1 Source

Hint the type system about the type constructor.

hintTypeArg :: f α -> p α -> f α infixl 1 Source

Hint the type system about the type argument.

hintType2 :: f α β -> p f -> f α β infixl 1 Source

Hint the type system about the two-argument type constructor.

hintType2Arg1 :: f α β -> p α -> f α β infixl 1 Source

Hint the type system about the first type argument.

hintType2Arg2 :: f α β -> p β -> f α β infixl 1 Source

Hint the type system about the second type argument.

hintType3 :: f α β γ -> p f -> f α β γ infixl 1 Source

Hint the type system about the three-argument type constructor.

hintType3Arg1 :: f α β γ -> p α -> f α β γ infixl 1 Source

Hint the type system about the first type argument.

hintType3Arg2 :: f α β γ -> p β -> f α β γ infixl 1 Source

Hint the type system about the second type argument.

hintType3Arg3 :: f α β γ -> p γ -> f α β γ infixl 1 Source

Hint the type system about the third type argument.

Standard types proxies

data Proxy t :: k -> *

A concrete, poly-kinded proxy type

Constructors

Proxy 

Instances

Monad (Proxy *) 
Functor (Proxy *) 
Applicative (Proxy *) 
Bounded (Proxy k s) 
Enum (Proxy k s) 
Eq (Proxy k s) 
Ord (Proxy k s) 
Read (Proxy k s) 
Show (Proxy k s) 
Ix (Proxy k s) 

aUnit :: Proxy () Source

() proxy value.

aChar :: Proxy Char Source

Char proxy value.

anInt :: Proxy Int Source

Int proxy value.

anInt8 :: Proxy Int8 Source

Int8 proxy value.

anInt16 :: Proxy Int16 Source

Int16 proxy value.

anInt32 :: Proxy Int32 Source

Int32 proxy value.

anInt64 :: Proxy Int64 Source

Int64 proxy value.

aWord :: Proxy Word Source

Word proxy value.

aWord8 :: Proxy Word8 Source

Word8 proxy value.

aRatio :: Proxy Ratio Source

Ratio proxy value.

aRatioOf :: Proxy α -> Proxy (Ratio α) Source

Ratio α proxy value.

aFixed :: Proxy Fixed Source

Fixed proxy value.

aFixedOf :: Proxy α -> Proxy (Fixed α) Source

Fixed α proxy value.

aUni :: Proxy Uni Source

Uni proxy value.

aDeci :: Proxy Deci Source

Deci proxy value.

aCenti :: Proxy Centi Source

Centi proxy value.

aMilli :: Proxy Milli Source

Milli proxy value.

aMicro :: Proxy Micro Source

Micro proxy value.

aNano :: Proxy Nano Source

Nano proxy value.

aPico :: Proxy Pico Source

Pico proxy value.

aFloat :: Proxy Float Source

Float proxy value.

aMaybe :: Proxy Maybe Source

Maybe proxy value.

aMaybeOf :: Proxy α -> Proxy (Maybe α) Source

Maybe α proxy value.

aPair :: Proxy (,) Source

Pair proxy value.

aPairOf :: Proxy α -> Proxy β -> Proxy (α, β) Source

(α, β) proxy value.

aTriple :: Proxy (,,) Source

Triple proxy value.

aTripleOf :: Proxy α -> Proxy β -> Proxy γ -> Proxy (α, β, γ) Source

(α, β, γ) proxy value.

anEitherOf :: Proxy α -> Proxy β -> Proxy (Either α β) Source

Either α β proxy value.

aList :: Proxy [] Source

List proxy value.

aListOf :: Proxy α -> Proxy [α] Source

List of α proxy value.

anIo :: Proxy IO Source

IO proxy value.

anIoOf :: Proxy α -> Proxy (IO α) Source

IO α proxy value.

anIoRef :: Proxy IORef Source

IORef proxy value.

anIoRefOf :: Proxy α -> Proxy (IORef α) Source

IORef α proxy value.

anSt :: Proxy ST Source

ST proxy value.

anStOf :: Proxy α -> Proxy (ST α) Source

ST α proxy value.

anStRef :: Proxy STRef Source

STRef proxy value.

anStRefOf :: Proxy α -> Proxy (STRef α) Source

STRef α proxy value.