| Copyright | Alexander Krupenkin 2018 |
|---|---|
| License | BSD3 |
| Maintainer | mail@akru.me |
| Stability | experimental |
| Portability | noportable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Solidity.Prim.Tagged
Contents
Description
Ethereum Abi tagged types.
The Tagged type
data Tagged (s :: k) b :: forall k. k -> Type -> Type #
A value is a value Tagged s bb 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 can't try to use the argument Tagged s bs 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.