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.
- 1 type
- 55 values
- Packagetype-hint-0.1
- Exports56
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceHint.hs
Hinting functions
10 declarationsHint 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
46 declarationsProxy 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
undefined :: a idiom.
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-9.1003.0 · GHC.Internal.GenericsMonad ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyFunctor ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyApplicative ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyFoldable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.FoldableTraversable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.TraversableAlternative ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyMonadPlus ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyMonadZip ProxyDefined in base-4.20.2.0 · Control.Monad.ZipEq1 ProxyDefined in base-4.20.2.0 · Data.Functor.ClassesOrd1 ProxyDefined in base-4.20.2.0 · Data.Functor.ClassesRead1 ProxyDefined in base-4.20.2.0 · Data.Functor.ClassesShow1 ProxyDefined in base-4.20.2.0 · Data.Functor.ClassesContravariant ProxyDefined in base-4.20.2.0 · Data.Functor.ContravariantBounded (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyEnum (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyEq (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyData t => Data (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.DataOrd (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyRead (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyShow (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyIx (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyGeneric (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.GenericsSemigroup (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.ProxyMonoid (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxytype Rep (Proxy t) = D1 ('MetaDataDefined in ghc-internal-9.1003.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-9.1003.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.