Hint the type system about the type.
Moduletype-hint-0.1Haskell2010
Type.Hint
This module provides Proxy values for various types from the base
library and functions to use these values as hints for type inference.
Synopsis
- value hintType
- value hintType1
- value hintTypeArg
- value hintType2
- value hintType2Arg1
- value hintType2Arg2
- value hintType3
- value hintType3Arg1
- value hintType3Arg2
- value hintType3Arg3
- data Proxy
- value aUnit
- value aChar
- value anInteger
- value anInt
- value anInt8
- value anInt16
- value anInt32
- value anInt64
- value aWord
- value aWord8
- value aWord16
- value aWord32
- value aWord64
- value aRatio
- value aRatioOf
- value aRational
- value aFixed
- value aFixedOf
- value aUni
- value aDeci
- value aCenti
- value aMilli
- value aMicro
- value aNano
- value aPico
- value aFloat
- value aDouble
- value aMaybe
- value aMaybeOf
- value aPair
- value aPairOf
- value aTriple
- value aTripleOf
- value anEither
- value anEitherOf
- value aList
- value aListOf
- value anIo
- value anIoOf
- value anIoRef
- value anIoRefOf
- value anSt
- value anStOf
- value anStRef
- value anStRefOf
- Packagetype-hint-0.1
- Exports56
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceHint.hs
Hinting functions
Hint the type system about the type constructor.
Hint the type system about the type argument.
Hint the type system about the two-argument type constructor.
Hint the type system about the first type argument.
Hint the type system about the second type argument.
Hint the type system about the three-argument type constructor.
Hint the type system about the first type argument.
Hint the type system about the second type argument.
Hint the type system about the third type argument.
Standard types proxies
Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).
Historically, Proxy :: Proxy a is a safer alternative to the
idiom.undefined :: a
Proxy :: Proxy (Void, Int -> Int)Proxy
Proxy can even hold types of higher kinds,
Proxy :: Proxy EitherProxy
Proxy :: Proxy FunctorProxy
Proxy :: Proxy complicatedStructureProxy
Instances27Generic1, Monad, Functor, Applicative, Foldable, Traversable, …
Generic1 ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonad ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyFunctor ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyApplicative ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyFoldable ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableTraversable ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableAlternative ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonadPlus ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonadZip ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipEq1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesRead1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesContravariant ProxyDefined in base-4.23.0.0 · Data.Functor.ContravariantBounded (Proxy t)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyEnum (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyEq (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyData t => Data (Proxy t)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyRead (Proxy t)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyShow (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyIx (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyGeneric (Proxy t)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonoid (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Proxytype Rep (Proxy t) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Proxy"
"GHC.Internal.Data.Proxy"
"ghc-internal"
'False) (C1 ('MetaCons"Proxy"
'PrefixI 'False) U1)type Rep1 Proxy = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Proxy"
"GHC.Internal.Data.Proxy"
"ghc-internal"
'False) (C1 ('MetaCons"Proxy"
'PrefixI 'False) U1)
() proxy value.
Char proxy value.
Integer proxy value.
Int proxy value.
Int8 proxy value.
Int16 proxy value.
Int32 proxy value.
Int64 proxy value.
Word proxy value.
Word8 proxy value.
Word16 proxy value.
Word32 proxy value.
Word64 proxy value.
Ratio proxy value.
Ratio α proxy value.
Rational proxy value.
Fixed proxy value.
Fixed α proxy value.
Uni proxy value.
Deci proxy value.
Centi proxy value.
Milli proxy value.
Micro proxy value.
Nano proxy value.
Pico proxy value.
Float proxy value.
Double proxy value.
Maybe proxy value.
Maybe α proxy value.
Pair proxy value.
(α, β) proxy value.
Triple proxy value.
(α, β, γ) proxy value.
Either proxy value.
Either α β proxy value.
List proxy value.
List of α proxy value.
IO proxy value.
IO α proxy value.
IORef proxy value.
IORef α proxy value.
ST proxy value.
ST α proxy value.
STRef proxy value.
STRef α proxy value.