Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions for working with Ada
in Template Haskell.
Synopsis
- newtype Ada = Lovelace {}
- getAda :: Ada -> Micro
- adaSymbol :: CurrencySymbol
- adaToken :: TokenName
- fromValue :: Value -> Ada
- toValue :: Ada -> Value
- lovelaceOf :: Integer -> Ada
- adaOf :: Micro -> Ada
- lovelaceValueOf :: Integer -> Value
- adaValueOf :: Micro -> Value
- divide :: Ada -> Ada -> Ada
- isZero :: Ada -> Bool
Documentation
ADA, the special currency on the Cardano blockchain. The unit of Ada is Lovelace, and
1M Lovelace is one Ada.
See note [Currencies] in TH
.
Instances
getAda :: Ada -> Micro Source #
Get the amount of Ada (the unit of the currency Ada) in this Ada
value.
adaSymbol :: CurrencySymbol Source #
The CurrencySymbol
of the Ada
currency.
Constructors
lovelaceOf :: Integer -> Ada Source #
Create Ada
representing the given quantity of Lovelace (the unit of the currency Ada).
lovelaceValueOf :: Integer -> Value Source #
A Value
with the given amount of Lovelace (the currency unit).
lovelaceValueOf == toValue . lovelaceOf
adaValueOf :: Micro -> Value Source #
A Value
with the given amount of Ada (the currency unit).
adaValueOf == toValue . adaOf