atlas-cardano-0.5.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

GeniusYield.Types.Rational

Description

 

Documentation

data GYRational #

Instances

Instances details
FromJSON GYRational #
>>> Aeson.decode @GYRational "\"0.123\""
Just (GYRational (123 % 1000))
>>> Aeson.eitherDecode @GYRational "\"Haskell\""
Left "Error in $: could not parse: `Haskell' (input does not start with a digit)"
Instance details

Defined in GeniusYield.Types.Rational

ToJSON GYRational #
>>> LBS8.putStrLn $ Aeson.encode (fromRational @GYRational 0.123)
"0.123"
Instance details

Defined in GeniusYield.Types.Rational

Generic GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

Associated Types

type Rep GYRationalTypeType Source #

Num GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

Read GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

Fractional GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

Real GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

RealFrac GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

Show GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

PrintfArg GYRational #
>>> printf "%6.4f\n" $ fromRational @GYRational 0.123
0.1230
Instance details

Defined in GeniusYield.Types.Rational

Eq GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

Ord GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

FromHttpApiData GYRational #
>>> Web.parseUrlPiece @GYRational "0.123"
Right (GYRational (123 % 1000))
Instance details

Defined in GeniusYield.Types.Rational

ToParamSchema GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

ToSchema GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

type Rep GYRational # 
Instance details

Defined in GeniusYield.Types.Rational

type Rep GYRational = D1 ('MetaData "GYRational" "GeniusYield.Types.Rational" "atlas-cardano-0.5.0-inplace" 'True) (C1 ('MetaCons "GYRational" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational)))