HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Moduleweb3-solidity-1.1.0.0Haskell2010

Data.Solidity.Prim.Tagged

Ethereum Abi tagged types.

  • 1 type

The Tagged type

1 declaration
newtypenewtype Tagged (s :: k) b
#

A Tagged s b value is a value b with an attached phantom type s. This can be used in place of the more traditional but less safe idiom of passing in an undefined value with the type, because unlike an (s -> b), a Tagged s b can't try to use the argument s as a real value.

Moreover, you don't have to rely on the compiler to inline away the extra argument, because the newtype is "free"

Tagged has kind k -> * -> * if the compiler supports PolyKinds, therefore there is an extra k showing in the instance haddocks that may cause confusion.

Instances81Semigroupoid, Generic1, FoldableWithIndex, FunctorWithIndex, TraversableWithIndex, RepeatWithIndex, …

Orphan instances

4 instances