{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module PlutusCore.Default.Builtins where
import PlutusPrelude
import PlutusCore.Builtin
import PlutusCore.Data (Data (..))
import PlutusCore.Default.Universe
import PlutusCore.Evaluation.Machine.BuiltinCostModel
import PlutusCore.Evaluation.Machine.ExBudgetStream (ExBudgetStream)
import PlutusCore.Evaluation.Machine.ExMemoryUsage (ExMemoryUsage, IntegerCostedLiterally (..),
ListCostedByLength (..),
NumBytesCostedAsNumWords (..), memoryUsage,
singletonRose)
import PlutusCore.Pretty (PrettyConfigPlc)
import PlutusCore.Bitwise qualified as Bitwise
import PlutusCore.Crypto.BLS12_381.G1 qualified as BLS12_381.G1
import PlutusCore.Crypto.BLS12_381.G2 qualified as BLS12_381.G2
import PlutusCore.Crypto.BLS12_381.Pairing qualified as BLS12_381.Pairing
import PlutusCore.Crypto.Ed25519 (verifyEd25519Signature_V1, verifyEd25519Signature_V2)
import PlutusCore.Crypto.ExpMod qualified as ExpMod
import PlutusCore.Crypto.Hash qualified as Hash
import PlutusCore.Crypto.Secp256k1 (verifyEcdsaSecp256k1Signature, verifySchnorrSecp256k1Signature)
import Codec.Serialise (serialise)
import Control.Monad (unless)
import Data.ByteString qualified as BS
import Data.ByteString.Lazy qualified as BSL
import Data.Ix (Ix)
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8', encodeUtf8)
import Flat hiding (from, to)
import Flat.Decoder (Get, dBEBits8)
import Flat.Encoder as Flat (Encoding, NumBits, eBits)
import NoThunks.Class (NoThunks)
import Prettyprinter (viaShow)
data DefaultFun
= AddInteger
| SubtractInteger
| MultiplyInteger
| DivideInteger
| QuotientInteger
| RemainderInteger
| ModInteger
| EqualsInteger
| LessThanInteger
| LessThanEqualsInteger
| AppendByteString
| ConsByteString
| SliceByteString
| LengthOfByteString
| IndexByteString
| EqualsByteString
| LessThanByteString
| LessThanEqualsByteString
| Sha2_256
| Sha3_256
| Blake2b_256
| VerifyEd25519Signature
| VerifyEcdsaSecp256k1Signature
| VerifySchnorrSecp256k1Signature
| AppendString
| EqualsString
| EncodeUtf8
| DecodeUtf8
| IfThenElse
| ChooseUnit
| Trace
| FstPair
| SndPair
| ChooseList
| MkCons
| HeadList
| TailList
| NullList
| ChooseData
| ConstrData
| MapData
| ListData
| IData
| BData
| UnConstrData
| UnMapData
| UnListData
| UnIData
| UnBData
| EqualsData
| SerialiseData
| MkPairData
| MkNilData
| MkNilPairData
| Bls12_381_G1_add
| Bls12_381_G1_neg
| Bls12_381_G1_scalarMul
| Bls12_381_G1_equal
| Bls12_381_G1_hashToGroup
| Bls12_381_G1_compress
| Bls12_381_G1_uncompress
| Bls12_381_G2_add
| Bls12_381_G2_neg
| Bls12_381_G2_scalarMul
| Bls12_381_G2_equal
| Bls12_381_G2_hashToGroup
| Bls12_381_G2_compress
| Bls12_381_G2_uncompress
| Bls12_381_millerLoop
| Bls12_381_mulMlResult
| Bls12_381_finalVerify
| Keccak_256
| Blake2b_224
| IntegerToByteString
| ByteStringToInteger
| AndByteString
| OrByteString
| XorByteString
| ComplementByteString
| ReadBit
| WriteBits
| ReplicateByte
| ShiftByteString
| RotateByteString
| CountSetBits
| FindFirstSetBit
| Ripemd_160
| ExpModInteger
deriving stock (Int -> DefaultFun -> ShowS
[DefaultFun] -> ShowS
DefaultFun -> String
(Int -> DefaultFun -> ShowS)
-> (DefaultFun -> String)
-> ([DefaultFun] -> ShowS)
-> Show DefaultFun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DefaultFun -> ShowS
showsPrec :: Int -> DefaultFun -> ShowS
$cshow :: DefaultFun -> String
show :: DefaultFun -> String
$cshowList :: [DefaultFun] -> ShowS
showList :: [DefaultFun] -> ShowS
Show, DefaultFun -> DefaultFun -> Bool
(DefaultFun -> DefaultFun -> Bool)
-> (DefaultFun -> DefaultFun -> Bool) -> Eq DefaultFun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DefaultFun -> DefaultFun -> Bool
== :: DefaultFun -> DefaultFun -> Bool
$c/= :: DefaultFun -> DefaultFun -> Bool
/= :: DefaultFun -> DefaultFun -> Bool
Eq, Eq DefaultFun
Eq DefaultFun =>
(DefaultFun -> DefaultFun -> Ordering)
-> (DefaultFun -> DefaultFun -> Bool)
-> (DefaultFun -> DefaultFun -> Bool)
-> (DefaultFun -> DefaultFun -> Bool)
-> (DefaultFun -> DefaultFun -> Bool)
-> (DefaultFun -> DefaultFun -> DefaultFun)
-> (DefaultFun -> DefaultFun -> DefaultFun)
-> Ord DefaultFun
DefaultFun -> DefaultFun -> Bool
DefaultFun -> DefaultFun -> Ordering
DefaultFun -> DefaultFun -> DefaultFun
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: DefaultFun -> DefaultFun -> Ordering
compare :: DefaultFun -> DefaultFun -> Ordering
$c< :: DefaultFun -> DefaultFun -> Bool
< :: DefaultFun -> DefaultFun -> Bool
$c<= :: DefaultFun -> DefaultFun -> Bool
<= :: DefaultFun -> DefaultFun -> Bool
$c> :: DefaultFun -> DefaultFun -> Bool
> :: DefaultFun -> DefaultFun -> Bool
$c>= :: DefaultFun -> DefaultFun -> Bool
>= :: DefaultFun -> DefaultFun -> Bool
$cmax :: DefaultFun -> DefaultFun -> DefaultFun
max :: DefaultFun -> DefaultFun -> DefaultFun
$cmin :: DefaultFun -> DefaultFun -> DefaultFun
min :: DefaultFun -> DefaultFun -> DefaultFun
Ord, Int -> DefaultFun
DefaultFun -> Int
DefaultFun -> [DefaultFun]
DefaultFun -> DefaultFun
DefaultFun -> DefaultFun -> [DefaultFun]
DefaultFun -> DefaultFun -> DefaultFun -> [DefaultFun]
(DefaultFun -> DefaultFun)
-> (DefaultFun -> DefaultFun)
-> (Int -> DefaultFun)
-> (DefaultFun -> Int)
-> (DefaultFun -> [DefaultFun])
-> (DefaultFun -> DefaultFun -> [DefaultFun])
-> (DefaultFun -> DefaultFun -> [DefaultFun])
-> (DefaultFun -> DefaultFun -> DefaultFun -> [DefaultFun])
-> Enum DefaultFun
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: DefaultFun -> DefaultFun
succ :: DefaultFun -> DefaultFun
$cpred :: DefaultFun -> DefaultFun
pred :: DefaultFun -> DefaultFun
$ctoEnum :: Int -> DefaultFun
toEnum :: Int -> DefaultFun
$cfromEnum :: DefaultFun -> Int
fromEnum :: DefaultFun -> Int
$cenumFrom :: DefaultFun -> [DefaultFun]
enumFrom :: DefaultFun -> [DefaultFun]
$cenumFromThen :: DefaultFun -> DefaultFun -> [DefaultFun]
enumFromThen :: DefaultFun -> DefaultFun -> [DefaultFun]
$cenumFromTo :: DefaultFun -> DefaultFun -> [DefaultFun]
enumFromTo :: DefaultFun -> DefaultFun -> [DefaultFun]
$cenumFromThenTo :: DefaultFun -> DefaultFun -> DefaultFun -> [DefaultFun]
enumFromThenTo :: DefaultFun -> DefaultFun -> DefaultFun -> [DefaultFun]
Enum, DefaultFun
DefaultFun -> DefaultFun -> Bounded DefaultFun
forall a. a -> a -> Bounded a
$cminBound :: DefaultFun
minBound :: DefaultFun
$cmaxBound :: DefaultFun
maxBound :: DefaultFun
Bounded, (forall x. DefaultFun -> Rep DefaultFun x)
-> (forall x. Rep DefaultFun x -> DefaultFun) -> Generic DefaultFun
forall x. Rep DefaultFun x -> DefaultFun
forall x. DefaultFun -> Rep DefaultFun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. DefaultFun -> Rep DefaultFun x
from :: forall x. DefaultFun -> Rep DefaultFun x
$cto :: forall x. Rep DefaultFun x -> DefaultFun
to :: forall x. Rep DefaultFun x -> DefaultFun
Generic, Ord DefaultFun
Ord DefaultFun =>
((DefaultFun, DefaultFun) -> [DefaultFun])
-> ((DefaultFun, DefaultFun) -> DefaultFun -> Int)
-> ((DefaultFun, DefaultFun) -> DefaultFun -> Int)
-> ((DefaultFun, DefaultFun) -> DefaultFun -> Bool)
-> ((DefaultFun, DefaultFun) -> Int)
-> ((DefaultFun, DefaultFun) -> Int)
-> Ix DefaultFun
(DefaultFun, DefaultFun) -> Int
(DefaultFun, DefaultFun) -> [DefaultFun]
(DefaultFun, DefaultFun) -> DefaultFun -> Bool
(DefaultFun, DefaultFun) -> DefaultFun -> Int
forall a.
Ord a =>
((a, a) -> [a])
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Int)
-> ((a, a) -> a -> Bool)
-> ((a, a) -> Int)
-> ((a, a) -> Int)
-> Ix a
$crange :: (DefaultFun, DefaultFun) -> [DefaultFun]
range :: (DefaultFun, DefaultFun) -> [DefaultFun]
$cindex :: (DefaultFun, DefaultFun) -> DefaultFun -> Int
index :: (DefaultFun, DefaultFun) -> DefaultFun -> Int
$cunsafeIndex :: (DefaultFun, DefaultFun) -> DefaultFun -> Int
unsafeIndex :: (DefaultFun, DefaultFun) -> DefaultFun -> Int
$cinRange :: (DefaultFun, DefaultFun) -> DefaultFun -> Bool
inRange :: (DefaultFun, DefaultFun) -> DefaultFun -> Bool
$crangeSize :: (DefaultFun, DefaultFun) -> Int
rangeSize :: (DefaultFun, DefaultFun) -> Int
$cunsafeRangeSize :: (DefaultFun, DefaultFun) -> Int
unsafeRangeSize :: (DefaultFun, DefaultFun) -> Int
Ix)
deriving anyclass (DefaultFun -> ()
(DefaultFun -> ()) -> NFData DefaultFun
forall a. (a -> ()) -> NFData a
$crnf :: DefaultFun -> ()
rnf :: DefaultFun -> ()
NFData, Eq DefaultFun
Eq DefaultFun =>
(Int -> DefaultFun -> Int)
-> (DefaultFun -> Int) -> Hashable DefaultFun
Int -> DefaultFun -> Int
DefaultFun -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> DefaultFun -> Int
hashWithSalt :: Int -> DefaultFun -> Int
$chash :: DefaultFun -> Int
hash :: DefaultFun -> Int
Hashable, PrettyBy PrettyConfigPlc)
instance Pretty DefaultFun where
pretty :: forall ann. DefaultFun -> Doc ann
pretty DefaultFun
fun = String -> Doc ann
forall ann. String -> Doc ann
forall a ann. Pretty a => a -> Doc ann
pretty (String -> Doc ann) -> String -> Doc ann
forall a b. (a -> b) -> a -> b
$ ShowS
lowerInitialChar ShowS -> ShowS
forall a b. (a -> b) -> a -> b
$ DefaultFun -> String
forall a. Show a => a -> String
show DefaultFun
fun
instance ExMemoryUsage DefaultFun where
memoryUsage :: DefaultFun -> CostRose
memoryUsage DefaultFun
_ = CostingInteger -> CostRose
singletonRose CostingInteger
1
{-# INLINE memoryUsage #-}
nonZeroSecondArg
:: (Integer -> Integer -> Integer) -> Integer -> Integer -> BuiltinResult Integer
nonZeroSecondArg :: (Integer -> Integer -> Integer)
-> Integer -> Integer -> BuiltinResult Integer
nonZeroSecondArg Integer -> Integer -> Integer
_ !Integer
_ Integer
0 =
String -> BuiltinResult Integer
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Cannot divide by zero"
nonZeroSecondArg Integer -> Integer -> Integer
f Integer
x Integer
y = Integer -> BuiltinResult Integer
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Integer -> BuiltinResult Integer)
-> Integer -> BuiltinResult Integer
forall a b. (a -> b) -> a -> b
$ Integer -> Integer -> Integer
f Integer
x Integer
y
{-# INLINE nonZeroSecondArg #-}
eitherToBuiltinResult :: Show e => Either e r -> BuiltinResult r
eitherToBuiltinResult :: forall e r. Show e => Either e r -> BuiltinResult r
eitherToBuiltinResult = (e -> BuiltinResult r)
-> (r -> BuiltinResult r) -> Either e r -> BuiltinResult r
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
either (String -> BuiltinResult r
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail (String -> BuiltinResult r)
-> (e -> String) -> e -> BuiltinResult r
forall b c a. (b -> c) -> (a -> b) -> a -> c
. e -> String
forall a. Show a => a -> String
show) r -> BuiltinResult r
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
{-# INLINE eitherToBuiltinResult #-}
instance uni ~ DefaultUni => ToBuiltinMeaning uni DefaultFun where
type CostingPart uni DefaultFun = BuiltinCostModel
data BuiltinSemanticsVariant DefaultFun
= DefaultFunSemanticsVariantA
| DefaultFunSemanticsVariantB
| DefaultFunSemanticsVariantC
deriving stock (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
(BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool)
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool)
-> Eq (BuiltinSemanticsVariant DefaultFun)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
== :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
$c/= :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
/= :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
Eq, Eq (BuiltinSemanticsVariant DefaultFun)
Eq (BuiltinSemanticsVariant DefaultFun) =>
(BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Ordering)
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool)
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool)
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool)
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool)
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun)
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun)
-> Ord (BuiltinSemanticsVariant DefaultFun)
BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Ordering
BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Ordering
compare :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Ordering
$c< :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
< :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
$c<= :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
<= :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
$c> :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
> :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
$c>= :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
>= :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun -> Bool
$cmax :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
max :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
$cmin :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
min :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
Ord, Int -> BuiltinSemanticsVariant DefaultFun
BuiltinSemanticsVariant DefaultFun -> Int
BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
(BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun)
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun)
-> (Int -> BuiltinSemanticsVariant DefaultFun)
-> (BuiltinSemanticsVariant DefaultFun -> Int)
-> (BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun])
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun])
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun])
-> (BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun])
-> Enum (BuiltinSemanticsVariant DefaultFun)
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
succ :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
$cpred :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
pred :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
$ctoEnum :: Int -> BuiltinSemanticsVariant DefaultFun
toEnum :: Int -> BuiltinSemanticsVariant DefaultFun
$cfromEnum :: BuiltinSemanticsVariant DefaultFun -> Int
fromEnum :: BuiltinSemanticsVariant DefaultFun -> Int
$cenumFrom :: BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
enumFrom :: BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
$cenumFromThen :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
enumFromThen :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
$cenumFromTo :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
enumFromTo :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
$cenumFromThenTo :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
enumFromThenTo :: BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> [BuiltinSemanticsVariant DefaultFun]
Enum, BuiltinSemanticsVariant DefaultFun
BuiltinSemanticsVariant DefaultFun
-> BuiltinSemanticsVariant DefaultFun
-> Bounded (BuiltinSemanticsVariant DefaultFun)
forall a. a -> a -> Bounded a
$cminBound :: BuiltinSemanticsVariant DefaultFun
minBound :: BuiltinSemanticsVariant DefaultFun
$cmaxBound :: BuiltinSemanticsVariant DefaultFun
maxBound :: BuiltinSemanticsVariant DefaultFun
Bounded, Int -> BuiltinSemanticsVariant DefaultFun -> ShowS
[BuiltinSemanticsVariant DefaultFun] -> ShowS
BuiltinSemanticsVariant DefaultFun -> String
(Int -> BuiltinSemanticsVariant DefaultFun -> ShowS)
-> (BuiltinSemanticsVariant DefaultFun -> String)
-> ([BuiltinSemanticsVariant DefaultFun] -> ShowS)
-> Show (BuiltinSemanticsVariant DefaultFun)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BuiltinSemanticsVariant DefaultFun -> ShowS
showsPrec :: Int -> BuiltinSemanticsVariant DefaultFun -> ShowS
$cshow :: BuiltinSemanticsVariant DefaultFun -> String
show :: BuiltinSemanticsVariant DefaultFun -> String
$cshowList :: [BuiltinSemanticsVariant DefaultFun] -> ShowS
showList :: [BuiltinSemanticsVariant DefaultFun] -> ShowS
Show, (forall x.
BuiltinSemanticsVariant DefaultFun
-> Rep (BuiltinSemanticsVariant DefaultFun) x)
-> (forall x.
Rep (BuiltinSemanticsVariant DefaultFun) x
-> BuiltinSemanticsVariant DefaultFun)
-> Generic (BuiltinSemanticsVariant DefaultFun)
forall x.
Rep (BuiltinSemanticsVariant DefaultFun) x
-> BuiltinSemanticsVariant DefaultFun
forall x.
BuiltinSemanticsVariant DefaultFun
-> Rep (BuiltinSemanticsVariant DefaultFun) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
BuiltinSemanticsVariant DefaultFun
-> Rep (BuiltinSemanticsVariant DefaultFun) x
from :: forall x.
BuiltinSemanticsVariant DefaultFun
-> Rep (BuiltinSemanticsVariant DefaultFun) x
$cto :: forall x.
Rep (BuiltinSemanticsVariant DefaultFun) x
-> BuiltinSemanticsVariant DefaultFun
to :: forall x.
Rep (BuiltinSemanticsVariant DefaultFun) x
-> BuiltinSemanticsVariant DefaultFun
Generic)
deriving anyclass (BuiltinSemanticsVariant DefaultFun -> ()
(BuiltinSemanticsVariant DefaultFun -> ())
-> NFData (BuiltinSemanticsVariant DefaultFun)
forall a. (a -> ()) -> NFData a
$crnf :: BuiltinSemanticsVariant DefaultFun -> ()
rnf :: BuiltinSemanticsVariant DefaultFun -> ()
NFData, Context
-> BuiltinSemanticsVariant DefaultFun -> IO (Maybe ThunkInfo)
Proxy (BuiltinSemanticsVariant DefaultFun) -> String
(Context
-> BuiltinSemanticsVariant DefaultFun -> IO (Maybe ThunkInfo))
-> (Context
-> BuiltinSemanticsVariant DefaultFun -> IO (Maybe ThunkInfo))
-> (Proxy (BuiltinSemanticsVariant DefaultFun) -> String)
-> NoThunks (BuiltinSemanticsVariant DefaultFun)
forall a.
(Context -> a -> IO (Maybe ThunkInfo))
-> (Context -> a -> IO (Maybe ThunkInfo))
-> (Proxy a -> String)
-> NoThunks a
$cnoThunks :: Context
-> BuiltinSemanticsVariant DefaultFun -> IO (Maybe ThunkInfo)
noThunks :: Context
-> BuiltinSemanticsVariant DefaultFun -> IO (Maybe ThunkInfo)
$cwNoThunks :: Context
-> BuiltinSemanticsVariant DefaultFun -> IO (Maybe ThunkInfo)
wNoThunks :: Context
-> BuiltinSemanticsVariant DefaultFun -> IO (Maybe ThunkInfo)
$cshowTypeOf :: Proxy (BuiltinSemanticsVariant DefaultFun) -> String
showTypeOf :: Proxy (BuiltinSemanticsVariant DefaultFun) -> String
NoThunks)
toBuiltinMeaning
:: forall val. HasMeaningIn uni val
=> BuiltinSemanticsVariant DefaultFun
-> DefaultFun
-> BuiltinMeaning val BuiltinCostModel
toBuiltinMeaning :: forall val.
HasMeaningIn uni val =>
BuiltinSemanticsVariant DefaultFun
-> DefaultFun -> BuiltinMeaning val BuiltinCostModel
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
AddInteger =
let addIntegerDenotation :: Integer -> Integer -> Integer
addIntegerDenotation :: Integer -> Integer -> Integer
addIntegerDenotation = Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
(+)
{-# INLINE addIntegerDenotation #-}
in (Integer -> Integer -> Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Integer -> Integer)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> Integer)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Integer -> Integer)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> Integer
addIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramAddInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
SubtractInteger =
let subtractIntegerDenotation :: Integer -> Integer -> Integer
subtractIntegerDenotation :: Integer -> Integer -> Integer
subtractIntegerDenotation = (-)
{-# INLINE subtractIntegerDenotation #-}
in (Integer -> Integer -> Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Integer -> Integer)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> Integer)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Integer -> Integer)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> Integer
subtractIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramSubtractInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
MultiplyInteger =
let multiplyIntegerDenotation :: Integer -> Integer -> Integer
multiplyIntegerDenotation :: Integer -> Integer -> Integer
multiplyIntegerDenotation = Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
(*)
{-# INLINE multiplyIntegerDenotation #-}
in (Integer -> Integer -> Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Integer -> Integer)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> Integer)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Integer -> Integer)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> Integer
multiplyIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramMultiplyInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
DivideInteger =
let divideIntegerDenotation :: Integer -> Integer -> BuiltinResult Integer
divideIntegerDenotation :: Integer -> Integer -> BuiltinResult Integer
divideIntegerDenotation = (Integer -> Integer -> Integer)
-> Integer -> Integer -> BuiltinResult Integer
nonZeroSecondArg Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
div
{-# INLINE divideIntegerDenotation #-}
in (Integer -> Integer -> BuiltinResult Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Integer -> BuiltinResult Integer))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> BuiltinResult Integer)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Integer -> BuiltinResult Integer))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> BuiltinResult Integer
divideIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramDivideInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
QuotientInteger =
let quotientIntegerDenotation :: Integer -> Integer -> BuiltinResult Integer
quotientIntegerDenotation :: Integer -> Integer -> BuiltinResult Integer
quotientIntegerDenotation = (Integer -> Integer -> Integer)
-> Integer -> Integer -> BuiltinResult Integer
nonZeroSecondArg Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
quot
{-# INLINE quotientIntegerDenotation #-}
in (Integer -> Integer -> BuiltinResult Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Integer -> BuiltinResult Integer))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> BuiltinResult Integer)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Integer -> BuiltinResult Integer))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> BuiltinResult Integer
quotientIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramQuotientInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
RemainderInteger =
let remainderIntegerDenotation :: Integer -> Integer -> BuiltinResult Integer
remainderIntegerDenotation :: Integer -> Integer -> BuiltinResult Integer
remainderIntegerDenotation = (Integer -> Integer -> Integer)
-> Integer -> Integer -> BuiltinResult Integer
nonZeroSecondArg Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
rem
{-# INLINE remainderIntegerDenotation #-}
in (Integer -> Integer -> BuiltinResult Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Integer -> BuiltinResult Integer))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> BuiltinResult Integer)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Integer -> BuiltinResult Integer))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> BuiltinResult Integer
remainderIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramRemainderInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ModInteger =
let modIntegerDenotation :: Integer -> Integer -> BuiltinResult Integer
modIntegerDenotation :: Integer -> Integer -> BuiltinResult Integer
modIntegerDenotation = (Integer -> Integer -> Integer)
-> Integer -> Integer -> BuiltinResult Integer
nonZeroSecondArg Integer -> Integer -> Integer
forall a. Integral a => a -> a -> a
mod
{-# INLINE modIntegerDenotation #-}
in (Integer -> Integer -> BuiltinResult Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Integer -> BuiltinResult Integer))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> BuiltinResult Integer)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Integer -> BuiltinResult Integer))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> BuiltinResult Integer
modIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramModInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
EqualsInteger =
let equalsIntegerDenotation :: Integer -> Integer -> Bool
equalsIntegerDenotation :: Integer -> Integer -> Bool
equalsIntegerDenotation = Integer -> Integer -> Bool
forall a. Eq a => a -> a -> Bool
(==)
{-# INLINE equalsIntegerDenotation #-}
in (Integer -> Integer -> Bool)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Integer -> Integer -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> Bool)
-> (cost
-> FoldArgs (GetArgs (Integer -> Integer -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> Bool
equalsIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramEqualsInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
LessThanInteger =
let lessThanIntegerDenotation :: Integer -> Integer -> Bool
lessThanIntegerDenotation :: Integer -> Integer -> Bool
lessThanIntegerDenotation = Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
(<)
{-# INLINE lessThanIntegerDenotation #-}
in (Integer -> Integer -> Bool)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Integer -> Integer -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> Bool)
-> (cost
-> FoldArgs (GetArgs (Integer -> Integer -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> Bool
lessThanIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramLessThanInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
LessThanEqualsInteger =
let lessThanEqualsIntegerDenotation :: Integer -> Integer -> Bool
lessThanEqualsIntegerDenotation :: Integer -> Integer -> Bool
lessThanEqualsIntegerDenotation = Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
(<=)
{-# INLINE lessThanEqualsIntegerDenotation #-}
in (Integer -> Integer -> Bool)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Integer -> Integer -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> Bool)
-> (cost
-> FoldArgs (GetArgs (Integer -> Integer -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> Bool
lessThanEqualsIntegerDenotation
(CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramLessThanEqualsInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
AppendByteString =
let appendByteStringDenotation :: BS.ByteString -> BS.ByteString -> BS.ByteString
appendByteStringDenotation :: ByteString -> ByteString -> ByteString
appendByteStringDenotation = ByteString -> ByteString -> ByteString
BS.append
{-# INLINE appendByteStringDenotation #-}
in (ByteString -> ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> ByteString
appendByteStringDenotation
(CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramAppendByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
semvar DefaultFun
ConsByteString =
let costingFun
:: ExMemoryUsage a => BuiltinCostModel -> a -> BS.ByteString -> ExBudgetStream
costingFun :: forall a.
ExMemoryUsage a =>
BuiltinCostModel -> a -> ByteString -> ExBudgetStream
costingFun = CostingFun ModelTwoArguments -> a -> ByteString -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments -> a -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> a
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramConsByteString
{-# INLINE costingFun #-}
consByteStringMeaning_V1 :: BuiltinMeaning val BuiltinCostModel
consByteStringMeaning_V1 =
let consByteStringDenotation :: Integer -> BS.ByteString -> BS.ByteString
consByteStringDenotation :: Integer -> ByteString -> ByteString
consByteStringDenotation Integer
n ByteString
xs = Word8 -> ByteString -> ByteString
BS.cons (Integer -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
n) ByteString
xs
{-# INLINE consByteStringDenotation #-}
in (Integer -> ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> ByteString -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (Integer -> ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> ByteString -> ByteString
consByteStringDenotation
BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> ByteString -> ByteString)) ExBudgetStream
BuiltinCostModel -> Integer -> ByteString -> ExBudgetStream
forall a.
ExMemoryUsage a =>
BuiltinCostModel -> a -> ByteString -> ExBudgetStream
costingFun
consByteStringMeaning_V2 :: BuiltinMeaning val BuiltinCostModel
consByteStringMeaning_V2 =
let consByteStringDenotation :: Word8 -> BS.ByteString -> BS.ByteString
consByteStringDenotation :: Word8 -> ByteString -> ByteString
consByteStringDenotation = Word8 -> ByteString -> ByteString
BS.cons
{-# INLINE consByteStringDenotation #-}
in (Word8 -> ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Word8 -> ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Word8 -> ByteString -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (Word8 -> ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Word8 -> ByteString -> ByteString
consByteStringDenotation
BuiltinCostModel
-> FoldArgs
(GetArgs (Word8 -> ByteString -> ByteString)) ExBudgetStream
BuiltinCostModel -> Word8 -> ByteString -> ExBudgetStream
forall a.
ExMemoryUsage a =>
BuiltinCostModel -> a -> ByteString -> ExBudgetStream
costingFun
in case BuiltinSemanticsVariant DefaultFun
semvar of
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantA -> BuiltinMeaning val BuiltinCostModel
consByteStringMeaning_V1
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantB -> BuiltinMeaning val BuiltinCostModel
consByteStringMeaning_V1
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantC -> BuiltinMeaning val BuiltinCostModel
consByteStringMeaning_V2
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
SliceByteString =
let sliceByteStringDenotation :: Int -> Int -> BS.ByteString -> BS.ByteString
sliceByteStringDenotation :: Int -> Int -> ByteString -> ByteString
sliceByteStringDenotation Int
start Int
n ByteString
xs = Int -> ByteString -> ByteString
BS.take Int
n (Int -> ByteString -> ByteString
BS.drop Int
start ByteString
xs)
{-# INLINE sliceByteStringDenotation #-}
in (Int -> Int -> ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Int -> Int -> ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Int -> Int -> ByteString -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (Int -> Int -> ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Int -> Int -> ByteString -> ByteString
sliceByteStringDenotation
(CostingFun ModelThreeArguments
-> Int -> Int -> ByteString -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> Int -> Int -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> Int
-> Int
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramSliceByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
LengthOfByteString =
let lengthOfByteStringDenotation :: BS.ByteString -> Int
lengthOfByteStringDenotation :: ByteString -> Int
lengthOfByteStringDenotation = ByteString -> Int
BS.length
{-# INLINE lengthOfByteStringDenotation #-}
in (ByteString -> Int)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> Int)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> Int)
-> (cost -> FoldArgs (GetArgs (ByteString -> Int)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> Int
lengthOfByteStringDenotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramLengthOfByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
IndexByteString =
let indexByteStringDenotation :: BS.ByteString -> Int -> BuiltinResult Word8
indexByteStringDenotation :: ByteString -> Int -> BuiltinResult Word8
indexByteStringDenotation ByteString
xs Int
n = do
Bool -> BuiltinResult () -> BuiltinResult ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (Int
n Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= Int
0 Bool -> Bool -> Bool
&& Int
n Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< ByteString -> Int
BS.length ByteString
xs) (BuiltinResult () -> BuiltinResult ())
-> BuiltinResult () -> BuiltinResult ()
forall a b. (a -> b) -> a -> b
$
String -> BuiltinResult ()
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Index out of bounds"
Word8 -> BuiltinResult Word8
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word8 -> BuiltinResult Word8) -> Word8 -> BuiltinResult Word8
forall a b. (a -> b) -> a -> b
$ HasCallStack => ByteString -> Int -> Word8
ByteString -> Int -> Word8
BS.index ByteString
xs Int
n
{-# INLINE indexByteStringDenotation #-}
in (ByteString -> Int -> BuiltinResult Word8)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> Int -> BuiltinResult Word8))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> Int -> BuiltinResult Word8)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> Int -> BuiltinResult Word8))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> Int -> BuiltinResult Word8
indexByteStringDenotation
(CostingFun ModelTwoArguments -> ByteString -> Int -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> Int -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> Int
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramIndexByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
EqualsByteString =
let equalsByteStringDenotation :: BS.ByteString -> BS.ByteString -> Bool
equalsByteStringDenotation :: ByteString -> ByteString -> Bool
equalsByteStringDenotation = ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(==)
{-# INLINE equalsByteStringDenotation #-}
in (ByteString -> ByteString -> Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> ByteString -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> Bool)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> ByteString -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> Bool
equalsByteStringDenotation
(CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramEqualsByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
LessThanByteString =
let lessThanByteStringDenotation :: BS.ByteString -> BS.ByteString -> Bool
lessThanByteStringDenotation :: ByteString -> ByteString -> Bool
lessThanByteStringDenotation = ByteString -> ByteString -> Bool
forall a. Ord a => a -> a -> Bool
(<)
{-# INLINE lessThanByteStringDenotation #-}
in (ByteString -> ByteString -> Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> ByteString -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> Bool)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> ByteString -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> Bool
lessThanByteStringDenotation
(CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramLessThanByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
LessThanEqualsByteString =
let lessThanEqualsByteStringDenotation :: BS.ByteString -> BS.ByteString -> Bool
lessThanEqualsByteStringDenotation :: ByteString -> ByteString -> Bool
lessThanEqualsByteStringDenotation = ByteString -> ByteString -> Bool
forall a. Ord a => a -> a -> Bool
(<=)
{-# INLINE lessThanEqualsByteStringDenotation #-}
in (ByteString -> ByteString -> Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> ByteString -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> Bool)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> ByteString -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> Bool
lessThanEqualsByteStringDenotation
(CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramLessThanEqualsByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Sha2_256 =
let sha2_256Denotation :: BS.ByteString -> BS.ByteString
sha2_256Denotation :: ByteString -> ByteString
sha2_256Denotation = ByteString -> ByteString
Hash.sha2_256
{-# INLINE sha2_256Denotation #-}
in (ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString)
-> (cost
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString
sha2_256Denotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramSha2_256)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Sha3_256 =
let sha3_256Denotation :: BS.ByteString -> BS.ByteString
sha3_256Denotation :: ByteString -> ByteString
sha3_256Denotation = ByteString -> ByteString
Hash.sha3_256
{-# INLINE sha3_256Denotation #-}
in (ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString)
-> (cost
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString
sha3_256Denotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramSha3_256)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Blake2b_256 =
let blake2b_256Denotation :: BS.ByteString -> BS.ByteString
blake2b_256Denotation :: ByteString -> ByteString
blake2b_256Denotation = ByteString -> ByteString
Hash.blake2b_256
{-# INLINE blake2b_256Denotation #-}
in (ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString)
-> (cost
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString
blake2b_256Denotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBlake2b_256)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
semvar DefaultFun
VerifyEd25519Signature =
let verifyEd25519SignatureDenotation
:: BS.ByteString -> BS.ByteString -> BS.ByteString -> BuiltinResult Bool
verifyEd25519SignatureDenotation :: ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifyEd25519SignatureDenotation =
case BuiltinSemanticsVariant DefaultFun
semvar of
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantA -> ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifyEd25519Signature_V1
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantB -> ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifyEd25519Signature_V2
BuiltinSemanticsVariant DefaultFun
R:BuiltinSemanticsVariantDefaultFun
DefaultFunSemanticsVariantC -> ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifyEd25519Signature_V2
{-# INLINE verifyEd25519SignatureDenotation #-}
in (ByteString -> ByteString -> ByteString -> BuiltinResult Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool)
-> (cost
-> FoldArgs
(GetArgs
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifyEd25519SignatureDenotation
(CostingFun ModelThreeArguments
-> ByteString -> ByteString -> ByteString -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> ByteString -> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramVerifyEd25519Signature)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
VerifyEcdsaSecp256k1Signature =
let verifyEcdsaSecp256k1SignatureDenotation
:: BS.ByteString -> BS.ByteString -> BS.ByteString -> BuiltinResult Bool
verifyEcdsaSecp256k1SignatureDenotation :: ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifyEcdsaSecp256k1SignatureDenotation = ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifyEcdsaSecp256k1Signature
{-# INLINE verifyEcdsaSecp256k1SignatureDenotation #-}
in (ByteString -> ByteString -> ByteString -> BuiltinResult Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool)
-> (cost
-> FoldArgs
(GetArgs
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifyEcdsaSecp256k1SignatureDenotation
(CostingFun ModelThreeArguments
-> ByteString -> ByteString -> ByteString -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> ByteString -> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramVerifyEcdsaSecp256k1Signature)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
VerifySchnorrSecp256k1Signature =
let verifySchnorrSecp256k1SignatureDenotation
:: BS.ByteString -> BS.ByteString -> BS.ByteString -> BuiltinResult Bool
verifySchnorrSecp256k1SignatureDenotation :: ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifySchnorrSecp256k1SignatureDenotation = ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifySchnorrSecp256k1Signature
{-# INLINE verifySchnorrSecp256k1SignatureDenotation #-}
in (ByteString -> ByteString -> ByteString -> BuiltinResult Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool)
-> (cost
-> FoldArgs
(GetArgs
(ByteString -> ByteString -> ByteString -> BuiltinResult Bool))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> ByteString -> BuiltinResult Bool
verifySchnorrSecp256k1SignatureDenotation
(CostingFun ModelThreeArguments
-> ByteString -> ByteString -> ByteString -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> ByteString -> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramVerifySchnorrSecp256k1Signature)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
AppendString =
let appendStringDenotation :: Text -> Text -> Text
appendStringDenotation :: Text -> Text -> Text
appendStringDenotation = Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
(<>)
{-# INLINE appendStringDenotation #-}
in (Text -> Text -> Text)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Text -> Text -> Text)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Text -> Text -> Text)
-> (cost
-> FoldArgs (GetArgs (Text -> Text -> Text)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Text -> Text -> Text
appendStringDenotation
(CostingFun ModelTwoArguments -> Text -> Text -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments -> Text -> Text -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Text
-> Text
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramAppendString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
EqualsString =
let equalsStringDenotation :: Text -> Text -> Bool
equalsStringDenotation :: Text -> Text -> Bool
equalsStringDenotation = Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(==)
{-# INLINE equalsStringDenotation #-}
in (Text -> Text -> Bool)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Text -> Text -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Text -> Text -> Bool)
-> (cost
-> FoldArgs (GetArgs (Text -> Text -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Text -> Text -> Bool
equalsStringDenotation
(CostingFun ModelTwoArguments -> Text -> Text -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments -> Text -> Text -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Text
-> Text
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramEqualsString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
EncodeUtf8 =
let encodeUtf8Denotation :: Text -> BS.ByteString
encodeUtf8Denotation :: Text -> ByteString
encodeUtf8Denotation = Text -> ByteString
encodeUtf8
{-# INLINE encodeUtf8Denotation #-}
in (Text -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Text -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Text -> ByteString)
-> (cost -> FoldArgs (GetArgs (Text -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Text -> ByteString
encodeUtf8Denotation
(CostingFun ModelOneArgument -> Text -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Text -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Text
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramEncodeUtf8)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
DecodeUtf8 =
let decodeUtf8Denotation :: BS.ByteString -> BuiltinResult Text
decodeUtf8Denotation :: ByteString -> BuiltinResult Text
decodeUtf8Denotation = Either UnicodeException Text -> BuiltinResult Text
forall e r. Show e => Either e r -> BuiltinResult r
eitherToBuiltinResult (Either UnicodeException Text -> BuiltinResult Text)
-> (ByteString -> Either UnicodeException Text)
-> ByteString
-> BuiltinResult Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Either UnicodeException Text
decodeUtf8'
{-# INLINE decodeUtf8Denotation #-}
in (ByteString -> BuiltinResult Text)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> BuiltinResult Text)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> BuiltinResult Text)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> BuiltinResult Text)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> BuiltinResult Text
decodeUtf8Denotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramDecodeUtf8)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
IfThenElse =
let ifThenElseDenotation :: Bool -> a -> a -> a
ifThenElseDenotation :: forall a. Bool -> a -> a -> a
ifThenElseDenotation Bool
b a
x a
y = if Bool
b then a
x else a
y
{-# INLINE ifThenElseDenotation #-}
in (Bool
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0)))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(Bool
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Bool
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0)))
-> (cost
-> FoldArgs
(GetArgs
(Bool
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Bool
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
forall a. Bool -> a -> a -> a
ifThenElseDenotation
(CostingFun ModelThreeArguments
-> Bool
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> Bool
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> Bool
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramIfThenElse)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ChooseUnit =
let chooseUnitDenotation :: () -> a -> a
chooseUnitDenotation :: forall a. () -> a -> a
chooseUnitDenotation () a
x = a
x
{-# INLINE chooseUnitDenotation #-}
in (()
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0)))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(()
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(()
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0)))
-> (cost
-> FoldArgs
(GetArgs
(()
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
()
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
forall a. () -> a -> a
chooseUnitDenotation
(CostingFun ModelTwoArguments
-> () -> Opaque val (TyVarRep ('TyNameRep "a" 0)) -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ()
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ()
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramChooseUnit)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Trace =
let traceDenotation :: Text -> a -> BuiltinResult a
traceDenotation :: forall a. Text -> a -> BuiltinResult a
traceDenotation Text
text a
a = a
a a -> BuiltinResult () -> BuiltinResult a
forall a b. a -> BuiltinResult b -> BuiltinResult a
forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ Text -> BuiltinResult ()
emit Text
text
{-# INLINE traceDenotation #-}
in (Text
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0))))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(Text
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Text
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0))))
-> (cost
-> FoldArgs
(GetArgs
(Text
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Text
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))
forall a. Text -> a -> BuiltinResult a
traceDenotation
(CostingFun ModelTwoArguments
-> Text
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Text
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Text
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramTrace)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
FstPair =
let fstPairDenotation :: SomeConstant uni (a, b) -> BuiltinResult (Opaque val a)
fstPairDenotation :: forall a b. SomeConstant uni (a, b) -> BuiltinResult (Opaque val a)
fstPairDenotation (SomeConstant (Some (ValueOf uni (Esc a)
uniPairAB a
xy))) = do
case uni (Esc a)
uniPairAB of
DefaultUniPair DefaultUni (Esc a2)
uniA DefaultUni (Esc a1)
_ -> Opaque val a -> BuiltinResult (Opaque val a)
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Opaque val a -> BuiltinResult (Opaque val a))
-> (a2 -> Opaque val a) -> a2 -> BuiltinResult (Opaque val a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniOf (Opaque val a) (Esc a2) -> a2 -> Opaque val a
forall a term. HasConstant term => UniOf term (Esc a) -> a -> term
fromValueOf UniOf (Opaque val a) (Esc a2)
DefaultUni (Esc a2)
uniA (a2 -> BuiltinResult (Opaque val a))
-> a2 -> BuiltinResult (Opaque val a)
forall a b. (a -> b) -> a -> b
$ (a2, a1) -> a2
forall a b. (a, b) -> a
fst a
(a2, a1)
xy
uni (Esc a)
_ ->
AReview BuiltinError UnliftingError
-> UnliftingError -> BuiltinResult (Opaque val a)
forall e (m :: * -> *) t x.
MonadError e m =>
AReview e t -> t -> m x
throwing AReview BuiltinError UnliftingError
forall err. AsBuiltinError err => Prism' err UnliftingError
Prism' BuiltinError UnliftingError
_StructuralUnliftingError UnliftingError
"Expected a pair but got something else"
{-# INLINE fstPairDenotation #-}
in (SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0))))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0))))
-> (cost
-> FoldArgs
(GetArgs
(SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))
forall a b. SomeConstant uni (a, b) -> BuiltinResult (Opaque val a)
fstPairDenotation
(CostingFun ModelOneArgument
-> SomeConstant
DefaultUni
(TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument
-> SomeConstant
DefaultUni
(TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> SomeConstant
DefaultUni
(TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramFstPair)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
SndPair =
let sndPairDenotation :: SomeConstant uni (a, b) -> BuiltinResult (Opaque val b)
sndPairDenotation :: forall a b. SomeConstant uni (a, b) -> BuiltinResult (Opaque val b)
sndPairDenotation (SomeConstant (Some (ValueOf uni (Esc a)
uniPairAB a
xy))) = do
case uni (Esc a)
uniPairAB of
DefaultUniPair DefaultUni (Esc a2)
_ DefaultUni (Esc a1)
uniB -> Opaque val b -> BuiltinResult (Opaque val b)
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Opaque val b -> BuiltinResult (Opaque val b))
-> (a1 -> Opaque val b) -> a1 -> BuiltinResult (Opaque val b)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniOf (Opaque val b) (Esc a1) -> a1 -> Opaque val b
forall a term. HasConstant term => UniOf term (Esc a) -> a -> term
fromValueOf UniOf (Opaque val b) (Esc a1)
DefaultUni (Esc a1)
uniB (a1 -> BuiltinResult (Opaque val b))
-> a1 -> BuiltinResult (Opaque val b)
forall a b. (a -> b) -> a -> b
$ (a2, a1) -> a1
forall a b. (a, b) -> b
snd a
(a2, a1)
xy
uni (Esc a)
_ ->
AReview BuiltinError UnliftingError
-> UnliftingError -> BuiltinResult (Opaque val b)
forall e (m :: * -> *) t x.
MonadError e m =>
AReview e t -> t -> m x
throwing AReview BuiltinError UnliftingError
forall err. AsBuiltinError err => Prism' err UnliftingError
Prism' BuiltinError UnliftingError
_StructuralUnliftingError UnliftingError
"Expected a pair but got something else"
{-# INLINE sndPairDenotation #-}
in (SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1))))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1)))))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1))))
-> (cost
-> FoldArgs
(GetArgs
(SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1)))))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
SomeConstant
uni (TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1)))
forall a b. SomeConstant uni (a, b) -> BuiltinResult (Opaque val b)
sndPairDenotation
(CostingFun ModelOneArgument
-> SomeConstant
DefaultUni
(TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument
-> SomeConstant
DefaultUni
(TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> SomeConstant
DefaultUni
(TyVarRep ('TyNameRep "a" 0), TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramSndPair)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ChooseList =
let chooseListDenotation :: SomeConstant uni [a] -> b -> b -> BuiltinResult b
chooseListDenotation :: forall a b. SomeConstant uni [a] -> b -> b -> BuiltinResult b
chooseListDenotation (SomeConstant (Some (ValueOf uni (Esc a)
uniListA a
xs))) b
a b
b = do
case uni (Esc a)
uniListA of
DefaultUniList DefaultUni (Esc a1)
_ -> b -> BuiltinResult b
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (b -> BuiltinResult b) -> b -> BuiltinResult b
forall a b. (a -> b) -> a -> b
$ case a
xs of
[] -> b
a
a1
_ : [a1]
_ -> b
b
uni (Esc a)
_ -> AReview BuiltinError UnliftingError
-> UnliftingError -> BuiltinResult b
forall e (m :: * -> *) t x.
MonadError e m =>
AReview e t -> t -> m x
throwing AReview BuiltinError UnliftingError
forall err. AsBuiltinError err => Prism' err UnliftingError
Prism' BuiltinError UnliftingError
_StructuralUnliftingError UnliftingError
"Expected a list but got something else"
{-# INLINE chooseListDenotation #-}
in (SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1))))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1)))))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1))))
-> (cost
-> FoldArgs
(GetArgs
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1)))))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "b" 1)))
forall a b. SomeConstant uni [a] -> b -> b -> BuiltinResult b
chooseListDenotation
(CostingFun ModelThreeArguments
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> Opaque val (TyVarRep ('TyNameRep "b" 1))
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramChooseList)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
MkCons =
let mkConsDenotation
:: SomeConstant uni a -> SomeConstant uni [a] -> BuiltinResult (Opaque val [a])
mkConsDenotation :: forall a.
SomeConstant uni a
-> SomeConstant uni [a] -> BuiltinResult (Opaque val [a])
mkConsDenotation
(SomeConstant (Some (ValueOf uni (Esc a)
uniA a
x)))
(SomeConstant (Some (ValueOf uni (Esc a)
uniListA a
xs))) = do
case uni (Esc a)
uniListA of
DefaultUniList DefaultUni (Esc a1)
uniA' -> case uni (Esc a)
uniA uni (Esc a) -> uni (Esc a1) -> Maybe (Esc a :~: Esc a1)
forall a b. uni a -> uni b -> Maybe (a :~: b)
forall k (f :: k -> *) (a :: k) (b :: k).
GEq f =>
f a -> f b -> Maybe (a :~: b)
`geq` uni (Esc a1)
DefaultUni (Esc a1)
uniA' of
Just Esc a :~: Esc a1
Refl -> Opaque val [a] -> BuiltinResult (Opaque val [a])
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Opaque val [a] -> BuiltinResult (Opaque val [a]))
-> ([a] -> Opaque val [a]) -> [a] -> BuiltinResult (Opaque val [a])
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniOf (Opaque val [a]) (Esc [a]) -> [a] -> Opaque val [a]
forall a term. HasConstant term => UniOf term (Esc a) -> a -> term
fromValueOf uni (Esc a)
UniOf (Opaque val [a]) (Esc [a])
uniListA ([a] -> BuiltinResult (Opaque val [a]))
-> [a] -> BuiltinResult (Opaque val [a])
forall a b. (a -> b) -> a -> b
$ a
x a -> [a] -> [a]
forall a. a -> [a] -> [a]
: a
[a]
xs
Maybe (Esc a :~: Esc a1)
_ -> AReview BuiltinError UnliftingError
-> UnliftingError -> BuiltinResult (Opaque val [a])
forall e (m :: * -> *) t x.
MonadError e m =>
AReview e t -> t -> m x
throwing AReview BuiltinError UnliftingError
forall err. AsBuiltinError err => Prism' err UnliftingError
Prism' BuiltinError UnliftingError
_StructuralUnliftingError
UnliftingError
"The type of the value does not match the type of elements in the list"
uni (Esc a)
_ -> AReview BuiltinError UnliftingError
-> UnliftingError -> BuiltinResult (Opaque val [a])
forall e (m :: * -> *) t x.
MonadError e m =>
AReview e t -> t -> m x
throwing AReview BuiltinError UnliftingError
forall err. AsBuiltinError err => Prism' err UnliftingError
Prism' BuiltinError UnliftingError
_StructuralUnliftingError UnliftingError
"Expected a list but got something else"
{-# INLINE mkConsDenotation #-}
in (SomeConstant uni (TyVarRep ('TyNameRep "a" 0))
-> SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)]))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(SomeConstant uni (TyVarRep ('TyNameRep "a" 0))
-> SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)])))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(SomeConstant uni (TyVarRep ('TyNameRep "a" 0))
-> SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)]))
-> (cost
-> FoldArgs
(GetArgs
(SomeConstant uni (TyVarRep ('TyNameRep "a" 0))
-> SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)])))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
SomeConstant uni (TyVarRep ('TyNameRep "a" 0))
-> SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)])
forall a.
SomeConstant uni a
-> SomeConstant uni [a] -> BuiltinResult (Opaque val [a])
mkConsDenotation
(CostingFun ModelTwoArguments
-> SomeConstant DefaultUni (TyVarRep ('TyNameRep "a" 0))
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> SomeConstant DefaultUni (TyVarRep ('TyNameRep "a" 0))
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> SomeConstant DefaultUni (TyVarRep ('TyNameRep "a" 0))
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramMkCons)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
HeadList =
let headListDenotation :: SomeConstant uni [a] -> BuiltinResult (Opaque val a)
headListDenotation :: forall a. SomeConstant uni [a] -> BuiltinResult (Opaque val a)
headListDenotation (SomeConstant (Some (ValueOf uni (Esc a)
uniListA a
xs))) = do
case uni (Esc a)
uniListA of
DefaultUniList DefaultUni (Esc a1)
uniA -> case a
xs of
[] -> String -> BuiltinResult (Opaque val a)
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Expected a non-empty list but got an empty one"
a1
x : [a1]
_ -> Opaque val a -> BuiltinResult (Opaque val a)
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Opaque val a -> BuiltinResult (Opaque val a))
-> Opaque val a -> BuiltinResult (Opaque val a)
forall a b. (a -> b) -> a -> b
$ UniOf (Opaque val a) (Esc a1) -> a1 -> Opaque val a
forall a term. HasConstant term => UniOf term (Esc a) -> a -> term
fromValueOf UniOf (Opaque val a) (Esc a1)
DefaultUni (Esc a1)
uniA a1
x
uni (Esc a)
_ -> AReview BuiltinError UnliftingError
-> UnliftingError -> BuiltinResult (Opaque val a)
forall e (m :: * -> *) t x.
MonadError e m =>
AReview e t -> t -> m x
throwing AReview BuiltinError UnliftingError
forall err. AsBuiltinError err => Prism' err UnliftingError
Prism' BuiltinError UnliftingError
_StructuralUnliftingError UnliftingError
"Expected a list but got something else"
{-# INLINE headListDenotation #-}
in (SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0))))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0))))
-> (cost
-> FoldArgs
(GetArgs
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val (TyVarRep ('TyNameRep "a" 0)))
forall a. SomeConstant uni [a] -> BuiltinResult (Opaque val a)
headListDenotation
(CostingFun ModelOneArgument
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramHeadList)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
TailList =
let tailListDenotation :: SomeConstant uni [a] -> BuiltinResult (Opaque val [a])
tailListDenotation :: forall a. SomeConstant uni [a] -> BuiltinResult (Opaque val [a])
tailListDenotation (SomeConstant (Some (ValueOf uni (Esc a)
uniListA a
xs))) = do
case uni (Esc a)
uniListA of
DefaultUniList DefaultUni (Esc a1)
_ -> case a
xs of
[] -> String -> BuiltinResult (Opaque val [a])
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Expected a non-empty list but got an empty one"
a1
_ : [a1]
xs' -> Opaque val [a] -> BuiltinResult (Opaque val [a])
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Opaque val [a] -> BuiltinResult (Opaque val [a]))
-> Opaque val [a] -> BuiltinResult (Opaque val [a])
forall a b. (a -> b) -> a -> b
$ UniOf (Opaque val [a]) (Esc [a1]) -> [a1] -> Opaque val [a]
forall a term. HasConstant term => UniOf term (Esc a) -> a -> term
fromValueOf uni (Esc a)
UniOf (Opaque val [a]) (Esc [a1])
uniListA [a1]
xs'
uni (Esc a)
_ -> AReview BuiltinError UnliftingError
-> UnliftingError -> BuiltinResult (Opaque val [a])
forall e (m :: * -> *) t x.
MonadError e m =>
AReview e t -> t -> m x
throwing AReview BuiltinError UnliftingError
forall err. AsBuiltinError err => Prism' err UnliftingError
Prism' BuiltinError UnliftingError
_StructuralUnliftingError UnliftingError
"Expected a list but got something else"
{-# INLINE tailListDenotation #-}
in (SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)]))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)])))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)]))
-> (cost
-> FoldArgs
(GetArgs
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)])))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult (Opaque val [TyVarRep ('TyNameRep "a" 0)])
forall a. SomeConstant uni [a] -> BuiltinResult (Opaque val [a])
tailListDenotation
(CostingFun ModelOneArgument
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramTailList)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
NullList =
let nullListDenotation :: SomeConstant uni [a] -> BuiltinResult Bool
nullListDenotation :: forall a. SomeConstant uni [a] -> BuiltinResult Bool
nullListDenotation (SomeConstant (Some (ValueOf uni (Esc a)
uniListA a
xs))) = do
case uni (Esc a)
uniListA of
DefaultUniList DefaultUni (Esc a1)
_ -> Bool -> BuiltinResult Bool
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Bool -> BuiltinResult Bool) -> Bool -> BuiltinResult Bool
forall a b. (a -> b) -> a -> b
$ [a1] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null a
[a1]
xs
uni (Esc a)
_ ->
AReview BuiltinError UnliftingError
-> UnliftingError -> BuiltinResult Bool
forall e (m :: * -> *) t x.
MonadError e m =>
AReview e t -> t -> m x
throwing AReview BuiltinError UnliftingError
forall err. AsBuiltinError err => Prism' err UnliftingError
Prism' BuiltinError UnliftingError
_StructuralUnliftingError UnliftingError
"Expected a list but got something else"
{-# INLINE nullListDenotation #-}
in (SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult Bool))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult Bool)
-> (cost
-> FoldArgs
(GetArgs
(SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult Bool))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
SomeConstant uni [TyVarRep ('TyNameRep "a" 0)]
-> BuiltinResult Bool
forall a. SomeConstant uni [a] -> BuiltinResult Bool
nullListDenotation
(CostingFun ModelOneArgument
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> SomeConstant DefaultUni [TyVarRep ('TyNameRep "a" 0)]
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramNullList)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ChooseData =
let chooseDataDenotation :: Data -> a -> a -> a -> a -> a -> a
chooseDataDenotation :: forall a. Data -> a -> a -> a -> a -> a -> a
chooseDataDenotation Data
d a
xConstr a
xMap a
xList a
xI a
xB =
case Data
d of
Constr {} -> a
xConstr
Map {} -> a
xMap
List {} -> a
xList
I {} -> a
xI
B {} -> a
xB
{-# INLINE chooseDataDenotation #-}
in (Data
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0)))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(Data
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0)))
-> (cost
-> FoldArgs
(GetArgs
(Data
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
forall a. Data -> a -> a -> a -> a -> a -> a
chooseDataDenotation
(CostingFun ModelSixArguments
-> Data
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream
forall a1 a2 a3 a4 a5 a6.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3,
ExMemoryUsage a4, ExMemoryUsage a5, ExMemoryUsage a6) =>
CostingFun ModelSixArguments
-> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> ExBudgetStream
runCostingFunSixArguments (CostingFun ModelSixArguments
-> Data
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelSixArguments)
-> BuiltinCostModel
-> Data
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> Opaque val (TyVarRep ('TyNameRep "a" 0))
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelSixArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelSixArguments
paramChooseData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ConstrData =
let constrDataDenotation :: Integer -> [Data] -> Data
constrDataDenotation :: Integer -> [Data] -> Data
constrDataDenotation = Integer -> [Data] -> Data
Constr
{-# INLINE constrDataDenotation #-}
in (Integer -> [Data] -> Data)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Integer -> [Data] -> Data)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> [Data] -> Data)
-> (cost
-> FoldArgs (GetArgs (Integer -> [Data] -> Data)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> [Data] -> Data
constrDataDenotation
(CostingFun ModelTwoArguments -> Integer -> [Data] -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> [Data] -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> [Data]
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramConstrData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
MapData =
let mapDataDenotation :: [(Data, Data)] -> Data
mapDataDenotation :: [(Data, Data)] -> Data
mapDataDenotation = [(Data, Data)] -> Data
Map
{-# INLINE mapDataDenotation #-}
in ([(Data, Data)] -> Data)
-> (BuiltinCostModel
-> FoldArgs (GetArgs ([(Data, Data)] -> Data)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
([(Data, Data)] -> Data)
-> (cost
-> FoldArgs (GetArgs ([(Data, Data)] -> Data)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
[(Data, Data)] -> Data
mapDataDenotation
(CostingFun ModelOneArgument -> [(Data, Data)] -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> [(Data, Data)] -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> [(Data, Data)]
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramMapData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ListData =
let listDataDenotation :: [Data] -> Data
listDataDenotation :: [Data] -> Data
listDataDenotation = [Data] -> Data
List
{-# INLINE listDataDenotation #-}
in ([Data] -> Data)
-> (BuiltinCostModel
-> FoldArgs (GetArgs ([Data] -> Data)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
([Data] -> Data)
-> (cost -> FoldArgs (GetArgs ([Data] -> Data)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
[Data] -> Data
listDataDenotation
(CostingFun ModelOneArgument -> [Data] -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> [Data] -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> [Data]
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramListData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
IData =
let iDataDenotation :: Integer -> Data
iDataDenotation :: Integer -> Data
iDataDenotation = Integer -> Data
I
{-# INLINE iDataDenotation #-}
in (Integer -> Data)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Integer -> Data)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Data)
-> (cost -> FoldArgs (GetArgs (Integer -> Data)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Data
iDataDenotation
(CostingFun ModelOneArgument -> Integer -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramIData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
BData =
let bDataDenotation :: BS.ByteString -> Data
bDataDenotation :: ByteString -> Data
bDataDenotation = ByteString -> Data
B
{-# INLINE bDataDenotation #-}
in (ByteString -> Data)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> Data)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> Data)
-> (cost -> FoldArgs (GetArgs (ByteString -> Data)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> Data
bDataDenotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
UnConstrData =
let unConstrDataDenotation :: Data -> BuiltinResult (Integer, [Data])
unConstrDataDenotation :: Data -> BuiltinResult (Integer, [Data])
unConstrDataDenotation = \case
Constr Integer
i [Data]
ds -> (Integer, [Data]) -> BuiltinResult (Integer, [Data])
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Integer
i, [Data]
ds)
Data
_ -> String -> BuiltinResult (Integer, [Data])
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Expected the Constr constructor but got a different one"
{-# INLINE unConstrDataDenotation #-}
in (Data -> BuiltinResult (Integer, [Data]))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Data -> BuiltinResult (Integer, [Data]))) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data -> BuiltinResult (Integer, [Data]))
-> (cost
-> FoldArgs
(GetArgs (Data -> BuiltinResult (Integer, [Data]))) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data -> BuiltinResult (Integer, [Data])
unConstrDataDenotation
(CostingFun ModelOneArgument -> Data -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Data -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Data
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramUnConstrData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
UnMapData =
let unMapDataDenotation :: Data -> BuiltinResult [(Data, Data)]
unMapDataDenotation :: Data -> BuiltinResult [(Data, Data)]
unMapDataDenotation = \case
Map [(Data, Data)]
es -> [(Data, Data)] -> BuiltinResult [(Data, Data)]
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure [(Data, Data)]
es
Data
_ -> String -> BuiltinResult [(Data, Data)]
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Expected the Map constructor but got a different one"
{-# INLINE unMapDataDenotation #-}
in (Data -> BuiltinResult [(Data, Data)])
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Data -> BuiltinResult [(Data, Data)])) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data -> BuiltinResult [(Data, Data)])
-> (cost
-> FoldArgs
(GetArgs (Data -> BuiltinResult [(Data, Data)])) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data -> BuiltinResult [(Data, Data)]
unMapDataDenotation
(CostingFun ModelOneArgument -> Data -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Data -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Data
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramUnMapData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
UnListData =
let unListDataDenotation :: Data -> BuiltinResult [Data]
unListDataDenotation :: Data -> BuiltinResult [Data]
unListDataDenotation = \case
List [Data]
ds -> [Data] -> BuiltinResult [Data]
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure [Data]
ds
Data
_ -> String -> BuiltinResult [Data]
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Expected the List constructor but got a different one"
{-# INLINE unListDataDenotation #-}
in (Data -> BuiltinResult [Data])
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Data -> BuiltinResult [Data])) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data -> BuiltinResult [Data])
-> (cost
-> FoldArgs
(GetArgs (Data -> BuiltinResult [Data])) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data -> BuiltinResult [Data]
unListDataDenotation
(CostingFun ModelOneArgument -> Data -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Data -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Data
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramUnListData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
UnIData =
let unIDataDenotation :: Data -> BuiltinResult Integer
unIDataDenotation :: Data -> BuiltinResult Integer
unIDataDenotation = \case
I Integer
i -> Integer -> BuiltinResult Integer
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Integer
i
Data
_ -> String -> BuiltinResult Integer
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Expected the I constructor but got a different one"
{-# INLINE unIDataDenotation #-}
in (Data -> BuiltinResult Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Data -> BuiltinResult Integer)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data -> BuiltinResult Integer)
-> (cost
-> FoldArgs
(GetArgs (Data -> BuiltinResult Integer)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data -> BuiltinResult Integer
unIDataDenotation
(CostingFun ModelOneArgument -> Data -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Data -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Data
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramUnIData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
UnBData =
let unBDataDenotation :: Data -> BuiltinResult BS.ByteString
unBDataDenotation :: Data -> BuiltinResult ByteString
unBDataDenotation = \case
B ByteString
b -> ByteString -> BuiltinResult ByteString
forall a. a -> BuiltinResult a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ByteString
b
Data
_ -> String -> BuiltinResult ByteString
forall a. String -> BuiltinResult a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"Expected the B constructor but got a different one"
{-# INLINE unBDataDenotation #-}
in (Data -> BuiltinResult ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Data -> BuiltinResult ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data -> BuiltinResult ByteString)
-> (cost
-> FoldArgs
(GetArgs (Data -> BuiltinResult ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data -> BuiltinResult ByteString
unBDataDenotation
(CostingFun ModelOneArgument -> Data -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Data -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Data
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramUnBData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
EqualsData =
let equalsDataDenotation :: Data -> Data -> Bool
equalsDataDenotation :: Data -> Data -> Bool
equalsDataDenotation = Data -> Data -> Bool
forall a. Eq a => a -> a -> Bool
(==)
{-# INLINE equalsDataDenotation #-}
in (Data -> Data -> Bool)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Data -> Data -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data -> Data -> Bool)
-> (cost
-> FoldArgs (GetArgs (Data -> Data -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data -> Data -> Bool
equalsDataDenotation
(CostingFun ModelTwoArguments -> Data -> Data -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments -> Data -> Data -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Data
-> Data
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramEqualsData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
SerialiseData =
let serialiseDataDenotation :: Data -> BS.ByteString
serialiseDataDenotation :: Data -> ByteString
serialiseDataDenotation = ByteString -> ByteString
BSL.toStrict (ByteString -> ByteString)
-> (Data -> ByteString) -> Data -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Data -> ByteString
forall a. Serialise a => a -> ByteString
serialise
{-# INLINE serialiseDataDenotation #-}
in (Data -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Data -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data -> ByteString)
-> (cost -> FoldArgs (GetArgs (Data -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data -> ByteString
serialiseDataDenotation
(CostingFun ModelOneArgument -> Data -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Data -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Data
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramSerialiseData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
MkPairData =
let mkPairDataDenotation :: Data -> Data -> (Data, Data)
mkPairDataDenotation :: Data -> Data -> (Data, Data)
mkPairDataDenotation = (,)
{-# INLINE mkPairDataDenotation #-}
in (Data -> Data -> (Data, Data))
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Data -> Data -> (Data, Data))) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Data -> Data -> (Data, Data))
-> (cost
-> FoldArgs
(GetArgs (Data -> Data -> (Data, Data))) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Data -> Data -> (Data, Data)
mkPairDataDenotation
(CostingFun ModelTwoArguments -> Data -> Data -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments -> Data -> Data -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Data
-> Data
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramMkPairData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
MkNilData =
let mkNilDataDenotation :: () -> [Data]
mkNilDataDenotation :: () -> [Data]
mkNilDataDenotation () = []
{-# INLINE mkNilDataDenotation #-}
in (() -> [Data])
-> (BuiltinCostModel
-> FoldArgs (GetArgs (() -> [Data])) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(() -> [Data])
-> (cost -> FoldArgs (GetArgs (() -> [Data])) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
() -> [Data]
mkNilDataDenotation
(CostingFun ModelOneArgument -> () -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> () -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ()
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramMkNilData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
MkNilPairData =
let mkNilPairDataDenotation :: () -> [(Data, Data)]
mkNilPairDataDenotation :: () -> [(Data, Data)]
mkNilPairDataDenotation () = []
{-# INLINE mkNilPairDataDenotation #-}
in (() -> [(Data, Data)])
-> (BuiltinCostModel
-> FoldArgs (GetArgs (() -> [(Data, Data)])) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(() -> [(Data, Data)])
-> (cost
-> FoldArgs (GetArgs (() -> [(Data, Data)])) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
() -> [(Data, Data)]
mkNilPairDataDenotation
(CostingFun ModelOneArgument -> () -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> () -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ()
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramMkNilPairData)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G1_add =
let bls12_381_G1_addDenotation
:: BLS12_381.G1.Element -> BLS12_381.G1.Element -> BLS12_381.G1.Element
bls12_381_G1_addDenotation :: Element -> Element -> Element
bls12_381_G1_addDenotation = Element -> Element -> Element
BLS12_381.G1.add
{-# INLINE bls12_381_G1_addDenotation #-}
in (Element -> Element -> Element)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Element -> Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> Element -> Element)
-> (cost
-> FoldArgs
(GetArgs (Element -> Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> Element -> Element
bls12_381_G1_addDenotation
(CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Element
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_G1_add)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G1_neg =
let bls12_381_G1_negDenotation :: BLS12_381.G1.Element -> BLS12_381.G1.Element
bls12_381_G1_negDenotation :: Element -> Element
bls12_381_G1_negDenotation = Element -> Element
BLS12_381.G1.neg
{-# INLINE bls12_381_G1_negDenotation #-}
in (Element -> Element)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> Element)
-> (cost -> FoldArgs (GetArgs (Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> Element
bls12_381_G1_negDenotation
(CostingFun ModelOneArgument -> Element -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBls12_381_G1_neg)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G1_scalarMul =
let bls12_381_G1_scalarMulDenotation
:: Integer -> BLS12_381.G1.Element -> BLS12_381.G1.Element
bls12_381_G1_scalarMulDenotation :: Integer -> Element -> Element
bls12_381_G1_scalarMulDenotation = Integer -> Element -> Element
BLS12_381.G1.scalarMul
{-# INLINE bls12_381_G1_scalarMulDenotation #-}
in (Integer -> Element -> Element)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Element -> Element)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Element -> Element
bls12_381_G1_scalarMulDenotation
(CostingFun ModelTwoArguments
-> Integer -> Element -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_G1_scalarMul)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G1_compress =
let bls12_381_G1_compressDenotation :: BLS12_381.G1.Element -> BS.ByteString
bls12_381_G1_compressDenotation :: Element -> ByteString
bls12_381_G1_compressDenotation = Element -> ByteString
BLS12_381.G1.compress
{-# INLINE bls12_381_G1_compressDenotation #-}
in (Element -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Element -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> ByteString)
-> (cost
-> FoldArgs (GetArgs (Element -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> ByteString
bls12_381_G1_compressDenotation
(CostingFun ModelOneArgument -> Element -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBls12_381_G1_compress)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G1_uncompress =
let bls12_381_G1_uncompressDenotation
:: BS.ByteString -> BuiltinResult BLS12_381.G1.Element
bls12_381_G1_uncompressDenotation :: ByteString -> BuiltinResult Element
bls12_381_G1_uncompressDenotation = Either BLSTError Element -> BuiltinResult Element
forall e r. Show e => Either e r -> BuiltinResult r
eitherToBuiltinResult (Either BLSTError Element -> BuiltinResult Element)
-> (ByteString -> Either BLSTError Element)
-> ByteString
-> BuiltinResult Element
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Either BLSTError Element
BLS12_381.G1.uncompress
{-# INLINE bls12_381_G1_uncompressDenotation #-}
in (ByteString -> BuiltinResult Element)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> BuiltinResult Element)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> BuiltinResult Element)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> BuiltinResult Element)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> BuiltinResult Element
bls12_381_G1_uncompressDenotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBls12_381_G1_uncompress)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G1_hashToGroup =
let bls12_381_G1_hashToGroupDenotation
:: BS.ByteString -> BS.ByteString -> BuiltinResult BLS12_381.G1.Element
bls12_381_G1_hashToGroupDenotation :: ByteString -> ByteString -> BuiltinResult Element
bls12_381_G1_hashToGroupDenotation = Either BLS12_381_Error Element -> BuiltinResult Element
forall e r. Show e => Either e r -> BuiltinResult r
eitherToBuiltinResult (Either BLS12_381_Error Element -> BuiltinResult Element)
-> (ByteString -> ByteString -> Either BLS12_381_Error Element)
-> ByteString
-> ByteString
-> BuiltinResult Element
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
.* ByteString -> ByteString -> Either BLS12_381_Error Element
BLS12_381.G1.hashToGroup
{-# INLINE bls12_381_G1_hashToGroupDenotation #-}
in (ByteString -> ByteString -> BuiltinResult Element)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> ByteString -> BuiltinResult Element))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> BuiltinResult Element)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> ByteString -> BuiltinResult Element))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> BuiltinResult Element
bls12_381_G1_hashToGroupDenotation
(CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_G1_hashToGroup)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G1_equal =
let bls12_381_G1_equalDenotation :: BLS12_381.G1.Element -> BLS12_381.G1.Element -> Bool
bls12_381_G1_equalDenotation :: Element -> Element -> Bool
bls12_381_G1_equalDenotation = Element -> Element -> Bool
forall a. Eq a => a -> a -> Bool
(==)
{-# INLINE bls12_381_G1_equalDenotation #-}
in (Element -> Element -> Bool)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Element -> Element -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> Element -> Bool)
-> (cost
-> FoldArgs (GetArgs (Element -> Element -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> Element -> Bool
bls12_381_G1_equalDenotation
(CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Element
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_G1_equal)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G2_add =
let bls12_381_G2_addDenotation
:: BLS12_381.G2.Element -> BLS12_381.G2.Element -> BLS12_381.G2.Element
bls12_381_G2_addDenotation :: Element -> Element -> Element
bls12_381_G2_addDenotation = Element -> Element -> Element
BLS12_381.G2.add
{-# INLINE bls12_381_G2_addDenotation #-}
in (Element -> Element -> Element)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Element -> Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> Element -> Element)
-> (cost
-> FoldArgs
(GetArgs (Element -> Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> Element -> Element
bls12_381_G2_addDenotation
(CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Element
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_G2_add)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G2_neg =
let bls12_381_G2_negDenotation :: BLS12_381.G2.Element -> BLS12_381.G2.Element
bls12_381_G2_negDenotation :: Element -> Element
bls12_381_G2_negDenotation = Element -> Element
BLS12_381.G2.neg
{-# INLINE bls12_381_G2_negDenotation #-}
in (Element -> Element)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> Element)
-> (cost -> FoldArgs (GetArgs (Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> Element
bls12_381_G2_negDenotation
(CostingFun ModelOneArgument -> Element -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBls12_381_G2_neg)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G2_scalarMul =
let bls12_381_G2_scalarMulDenotation
:: Integer -> BLS12_381.G2.Element -> BLS12_381.G2.Element
bls12_381_G2_scalarMulDenotation :: Integer -> Element -> Element
bls12_381_G2_scalarMulDenotation = Integer -> Element -> Element
BLS12_381.G2.scalarMul
{-# INLINE bls12_381_G2_scalarMulDenotation #-}
in (Integer -> Element -> Element)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Element -> Element)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Element -> Element)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Element -> Element
bls12_381_G2_scalarMulDenotation
(CostingFun ModelTwoArguments
-> Integer -> Element -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Integer -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Integer
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_G2_scalarMul)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G2_compress =
let bls12_381_G2_compressDenotation :: BLS12_381.G2.Element -> BS.ByteString
bls12_381_G2_compressDenotation :: Element -> ByteString
bls12_381_G2_compressDenotation = Element -> ByteString
BLS12_381.G2.compress
{-# INLINE bls12_381_G2_compressDenotation #-}
in (Element -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Element -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> ByteString)
-> (cost
-> FoldArgs (GetArgs (Element -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> ByteString
bls12_381_G2_compressDenotation
(CostingFun ModelOneArgument -> Element -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBls12_381_G2_compress)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G2_uncompress =
let bls12_381_G2_uncompressDenotation
:: BS.ByteString -> BuiltinResult BLS12_381.G2.Element
bls12_381_G2_uncompressDenotation :: ByteString -> BuiltinResult Element
bls12_381_G2_uncompressDenotation = Either BLSTError Element -> BuiltinResult Element
forall e r. Show e => Either e r -> BuiltinResult r
eitherToBuiltinResult (Either BLSTError Element -> BuiltinResult Element)
-> (ByteString -> Either BLSTError Element)
-> ByteString
-> BuiltinResult Element
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Either BLSTError Element
BLS12_381.G2.uncompress
{-# INLINE bls12_381_G2_uncompressDenotation #-}
in (ByteString -> BuiltinResult Element)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> BuiltinResult Element)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> BuiltinResult Element)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> BuiltinResult Element)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> BuiltinResult Element
bls12_381_G2_uncompressDenotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBls12_381_G2_uncompress)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G2_hashToGroup =
let bls12_381_G2_hashToGroupDenotation
:: BS.ByteString -> BS.ByteString -> BuiltinResult BLS12_381.G2.Element
bls12_381_G2_hashToGroupDenotation :: ByteString -> ByteString -> BuiltinResult Element
bls12_381_G2_hashToGroupDenotation = Either BLS12_381_Error Element -> BuiltinResult Element
forall e r. Show e => Either e r -> BuiltinResult r
eitherToBuiltinResult (Either BLS12_381_Error Element -> BuiltinResult Element)
-> (ByteString -> ByteString -> Either BLS12_381_Error Element)
-> ByteString
-> ByteString
-> BuiltinResult Element
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
.* ByteString -> ByteString -> Either BLS12_381_Error Element
BLS12_381.G2.hashToGroup
{-# INLINE bls12_381_G2_hashToGroupDenotation #-}
in (ByteString -> ByteString -> BuiltinResult Element)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> ByteString -> BuiltinResult Element))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString -> BuiltinResult Element)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> ByteString -> BuiltinResult Element))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString -> BuiltinResult Element
bls12_381_G2_hashToGroupDenotation
(CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_G2_hashToGroup)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_G2_equal =
let bls12_381_G2_equalDenotation :: BLS12_381.G2.Element -> BLS12_381.G2.Element -> Bool
bls12_381_G2_equalDenotation :: Element -> Element -> Bool
bls12_381_G2_equalDenotation = Element -> Element -> Bool
forall a. Eq a => a -> a -> Bool
(==)
{-# INLINE bls12_381_G2_equalDenotation #-}
in (Element -> Element -> Bool)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (Element -> Element -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> Element -> Bool)
-> (cost
-> FoldArgs (GetArgs (Element -> Element -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> Element -> Bool
bls12_381_G2_equalDenotation
(CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Element
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_G2_equal)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_millerLoop =
let bls12_381_millerLoopDenotation
:: BLS12_381.G1.Element -> BLS12_381.G2.Element -> BLS12_381.Pairing.MlResult
bls12_381_millerLoopDenotation :: Element -> Element -> MlResult
bls12_381_millerLoopDenotation = Element -> Element -> MlResult
BLS12_381.Pairing.millerLoop
{-# INLINE bls12_381_millerLoopDenotation #-}
in (Element -> Element -> MlResult)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Element -> Element -> MlResult)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Element -> Element -> MlResult)
-> (cost
-> FoldArgs
(GetArgs (Element -> Element -> MlResult)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Element -> Element -> MlResult
bls12_381_millerLoopDenotation
(CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Element -> Element -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Element
-> Element
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_millerLoop)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_mulMlResult =
let bls12_381_mulMlResultDenotation
:: BLS12_381.Pairing.MlResult
-> BLS12_381.Pairing.MlResult
-> BLS12_381.Pairing.MlResult
bls12_381_mulMlResultDenotation :: MlResult -> MlResult -> MlResult
bls12_381_mulMlResultDenotation = MlResult -> MlResult -> MlResult
BLS12_381.Pairing.mulMlResult
{-# INLINE bls12_381_mulMlResultDenotation #-}
in (MlResult -> MlResult -> MlResult)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (MlResult -> MlResult -> MlResult)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(MlResult -> MlResult -> MlResult)
-> (cost
-> FoldArgs
(GetArgs (MlResult -> MlResult -> MlResult)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
MlResult -> MlResult -> MlResult
bls12_381_mulMlResultDenotation
(CostingFun ModelTwoArguments
-> MlResult -> MlResult -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> MlResult -> MlResult -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> MlResult
-> MlResult
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_mulMlResult)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Bls12_381_finalVerify =
let bls12_381_finalVerifyDenotation
:: BLS12_381.Pairing.MlResult -> BLS12_381.Pairing.MlResult -> Bool
bls12_381_finalVerifyDenotation :: MlResult -> MlResult -> Bool
bls12_381_finalVerifyDenotation = MlResult -> MlResult -> Bool
BLS12_381.Pairing.finalVerify
{-# INLINE bls12_381_finalVerifyDenotation #-}
in (MlResult -> MlResult -> Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (MlResult -> MlResult -> Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(MlResult -> MlResult -> Bool)
-> (cost
-> FoldArgs
(GetArgs (MlResult -> MlResult -> Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
MlResult -> MlResult -> Bool
bls12_381_finalVerifyDenotation
(CostingFun ModelTwoArguments
-> MlResult -> MlResult -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> MlResult -> MlResult -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> MlResult
-> MlResult
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramBls12_381_finalVerify)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Keccak_256 =
let keccak_256Denotation :: BS.ByteString -> BS.ByteString
keccak_256Denotation :: ByteString -> ByteString
keccak_256Denotation = ByteString -> ByteString
Hash.keccak_256
{-# INLINE keccak_256Denotation #-}
in (ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString)
-> (cost
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString
keccak_256Denotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramKeccak_256)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Blake2b_224 =
let blake2b_224Denotation :: BS.ByteString -> BS.ByteString
blake2b_224Denotation :: ByteString -> ByteString
blake2b_224Denotation = ByteString -> ByteString
Hash.blake2b_224
{-# INLINE blake2b_224Denotation #-}
in (ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString)
-> (cost
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString
blake2b_224Denotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramBlake2b_224)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
IntegerToByteString =
let integerToByteStringDenotation :: Bool -> NumBytesCostedAsNumWords -> Integer -> BuiltinResult BS.ByteString
integerToByteStringDenotation :: Bool
-> NumBytesCostedAsNumWords -> Integer -> BuiltinResult ByteString
integerToByteStringDenotation Bool
b (NumBytesCostedAsNumWords Integer
w) = Bool -> Integer -> Integer -> BuiltinResult ByteString
Bitwise.integerToByteString Bool
b Integer
w
{-# INLINE integerToByteStringDenotation #-}
in (Bool
-> NumBytesCostedAsNumWords -> Integer -> BuiltinResult ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(Bool
-> NumBytesCostedAsNumWords
-> Integer
-> BuiltinResult ByteString))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Bool
-> NumBytesCostedAsNumWords -> Integer -> BuiltinResult ByteString)
-> (cost
-> FoldArgs
(GetArgs
(Bool
-> NumBytesCostedAsNumWords
-> Integer
-> BuiltinResult ByteString))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Bool
-> NumBytesCostedAsNumWords -> Integer -> BuiltinResult ByteString
integerToByteStringDenotation
(CostingFun ModelThreeArguments
-> Bool -> NumBytesCostedAsNumWords -> Integer -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> Bool -> NumBytesCostedAsNumWords -> Integer -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> Bool
-> NumBytesCostedAsNumWords
-> Integer
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramIntegerToByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ByteStringToInteger =
let byteStringToIntegerDenotation :: Bool -> BS.ByteString -> Integer
byteStringToIntegerDenotation :: Bool -> ByteString -> Integer
byteStringToIntegerDenotation = Bool -> ByteString -> Integer
Bitwise.byteStringToInteger
{-# INLINE byteStringToIntegerDenotation #-}
in (Bool -> ByteString -> Integer)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Bool -> ByteString -> Integer)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Bool -> ByteString -> Integer)
-> (cost
-> FoldArgs
(GetArgs (Bool -> ByteString -> Integer)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Bool -> ByteString -> Integer
byteStringToIntegerDenotation
(CostingFun ModelTwoArguments
-> Bool -> ByteString -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> Bool -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> Bool
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramByteStringToInteger)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
AndByteString =
let andByteStringDenotation :: Bool -> BS.ByteString -> BS.ByteString -> BS.ByteString
andByteStringDenotation :: Bool -> ByteString -> ByteString -> ByteString
andByteStringDenotation = Bool -> ByteString -> ByteString -> ByteString
Bitwise.andByteString
{-# INLINE andByteStringDenotation #-}
in (Bool -> ByteString -> ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Bool -> ByteString -> ByteString -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Bool -> ByteString -> ByteString -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (Bool -> ByteString -> ByteString -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Bool -> ByteString -> ByteString -> ByteString
andByteStringDenotation
(CostingFun ModelThreeArguments
-> Bool -> ByteString -> ByteString -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> Bool -> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> Bool
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramAndByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
OrByteString =
let orByteStringDenotation :: Bool -> BS.ByteString -> BS.ByteString -> BS.ByteString
orByteStringDenotation :: Bool -> ByteString -> ByteString -> ByteString
orByteStringDenotation = Bool -> ByteString -> ByteString -> ByteString
Bitwise.orByteString
{-# INLINE orByteStringDenotation #-}
in (Bool -> ByteString -> ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Bool -> ByteString -> ByteString -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Bool -> ByteString -> ByteString -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (Bool -> ByteString -> ByteString -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Bool -> ByteString -> ByteString -> ByteString
orByteStringDenotation
(CostingFun ModelThreeArguments
-> Bool -> ByteString -> ByteString -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> Bool -> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> Bool
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramOrByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
XorByteString =
let xorByteStringDenotation :: Bool -> BS.ByteString -> BS.ByteString -> BS.ByteString
xorByteStringDenotation :: Bool -> ByteString -> ByteString -> ByteString
xorByteStringDenotation = Bool -> ByteString -> ByteString -> ByteString
Bitwise.xorByteString
{-# INLINE xorByteStringDenotation #-}
in (Bool -> ByteString -> ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Bool -> ByteString -> ByteString -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Bool -> ByteString -> ByteString -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (Bool -> ByteString -> ByteString -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Bool -> ByteString -> ByteString -> ByteString
xorByteStringDenotation
(CostingFun ModelThreeArguments
-> Bool -> ByteString -> ByteString -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> Bool -> ByteString -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> Bool
-> ByteString
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramXorByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ComplementByteString =
let complementByteStringDenotation :: BS.ByteString -> BS.ByteString
complementByteStringDenotation :: ByteString -> ByteString
complementByteStringDenotation = ByteString -> ByteString
Bitwise.complementByteString
{-# INLINE complementByteStringDenotation #-}
in (ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString)
-> (cost
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString
complementByteStringDenotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramComplementByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ReadBit =
let readBitDenotation :: BS.ByteString -> Int -> BuiltinResult Bool
readBitDenotation :: ByteString -> Int -> BuiltinResult Bool
readBitDenotation = ByteString -> Int -> BuiltinResult Bool
Bitwise.readBit
{-# INLINE readBitDenotation #-}
in (ByteString -> Int -> BuiltinResult Bool)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> Int -> BuiltinResult Bool)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> Int -> BuiltinResult Bool)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> Int -> BuiltinResult Bool)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> Int -> BuiltinResult Bool
readBitDenotation
(CostingFun ModelTwoArguments -> ByteString -> Int -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> Int -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> Int
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramReadBit)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
WriteBits =
let writeBitsDenotation
:: BS.ByteString
-> ListCostedByLength Integer
-> Bool
-> BuiltinResult BS.ByteString
writeBitsDenotation :: ByteString
-> ListCostedByLength Integer -> Bool -> BuiltinResult ByteString
writeBitsDenotation ByteString
s (ListCostedByLength [Integer]
ixs) Bool
bit =
ByteString -> [Integer] -> Bool -> BuiltinResult ByteString
Bitwise.writeBits ByteString
s [Integer]
ixs Bool
bit
{-# INLINE writeBitsDenotation #-}
in (ByteString
-> ListCostedByLength Integer -> Bool -> BuiltinResult ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(ByteString
-> ListCostedByLength Integer -> Bool -> BuiltinResult ByteString))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString
-> ListCostedByLength Integer -> Bool -> BuiltinResult ByteString)
-> (cost
-> FoldArgs
(GetArgs
(ByteString
-> ListCostedByLength Integer -> Bool -> BuiltinResult ByteString))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString
-> ListCostedByLength Integer -> Bool -> BuiltinResult ByteString
writeBitsDenotation
(CostingFun ModelThreeArguments
-> ByteString
-> ListCostedByLength Integer
-> Bool
-> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> ByteString
-> ListCostedByLength Integer
-> Bool
-> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> ByteString
-> ListCostedByLength Integer
-> Bool
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramWriteBits)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ReplicateByte =
let replicateByteDenotation :: NumBytesCostedAsNumWords -> Word8 -> BuiltinResult BS.ByteString
replicateByteDenotation :: NumBytesCostedAsNumWords -> Word8 -> BuiltinResult ByteString
replicateByteDenotation (NumBytesCostedAsNumWords Integer
n) Word8
w = Integer -> Word8 -> BuiltinResult ByteString
Bitwise.replicateByte Integer
n Word8
w
{-# INLINE replicateByteDenotation #-}
in (NumBytesCostedAsNumWords -> Word8 -> BuiltinResult ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs
(NumBytesCostedAsNumWords -> Word8 -> BuiltinResult ByteString))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(NumBytesCostedAsNumWords -> Word8 -> BuiltinResult ByteString)
-> (cost
-> FoldArgs
(GetArgs
(NumBytesCostedAsNumWords -> Word8 -> BuiltinResult ByteString))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
NumBytesCostedAsNumWords -> Word8 -> BuiltinResult ByteString
replicateByteDenotation
(CostingFun ModelTwoArguments
-> NumBytesCostedAsNumWords -> Word8 -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> NumBytesCostedAsNumWords -> Word8 -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> NumBytesCostedAsNumWords
-> Word8
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramReplicateByte)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ShiftByteString =
let shiftByteStringDenotation :: BS.ByteString -> IntegerCostedLiterally -> BS.ByteString
shiftByteStringDenotation :: ByteString -> IntegerCostedLiterally -> ByteString
shiftByteStringDenotation ByteString
s (IntegerCostedLiterally Integer
n) = ByteString -> Integer -> ByteString
Bitwise.shiftByteString ByteString
s Integer
n
{-# INLINE shiftByteStringDenotation #-}
in (ByteString -> IntegerCostedLiterally -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> IntegerCostedLiterally -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> IntegerCostedLiterally -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> IntegerCostedLiterally -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> IntegerCostedLiterally -> ByteString
shiftByteStringDenotation
(CostingFun ModelTwoArguments
-> ByteString -> IntegerCostedLiterally -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> IntegerCostedLiterally -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> IntegerCostedLiterally
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramShiftByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
RotateByteString =
let rotateByteStringDenotation :: BS.ByteString -> IntegerCostedLiterally -> BS.ByteString
rotateByteStringDenotation :: ByteString -> IntegerCostedLiterally -> ByteString
rotateByteStringDenotation ByteString
s (IntegerCostedLiterally Integer
n) = ByteString -> Integer -> ByteString
Bitwise.rotateByteString ByteString
s Integer
n
{-# INLINE rotateByteStringDenotation #-}
in (ByteString -> IntegerCostedLiterally -> ByteString)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (ByteString -> IntegerCostedLiterally -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> IntegerCostedLiterally -> ByteString)
-> (cost
-> FoldArgs
(GetArgs (ByteString -> IntegerCostedLiterally -> ByteString))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> IntegerCostedLiterally -> ByteString
rotateByteStringDenotation
(CostingFun ModelTwoArguments
-> ByteString -> IntegerCostedLiterally -> ExBudgetStream
forall a1 a2.
(ExMemoryUsage a1, ExMemoryUsage a2) =>
CostingFun ModelTwoArguments -> a1 -> a2 -> ExBudgetStream
runCostingFunTwoArguments (CostingFun ModelTwoArguments
-> ByteString -> IntegerCostedLiterally -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelTwoArguments)
-> BuiltinCostModel
-> ByteString
-> IntegerCostedLiterally
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelTwoArguments
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelTwoArguments
paramRotateByteString)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
CountSetBits =
let countSetBitsDenotation :: BS.ByteString -> Int
countSetBitsDenotation :: ByteString -> Int
countSetBitsDenotation = ByteString -> Int
Bitwise.countSetBits
{-# INLINE countSetBitsDenotation #-}
in (ByteString -> Int)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> Int)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> Int)
-> (cost -> FoldArgs (GetArgs (ByteString -> Int)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> Int
countSetBitsDenotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramCountSetBits)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
FindFirstSetBit =
let findFirstSetBitDenotation :: BS.ByteString -> Int
findFirstSetBitDenotation :: ByteString -> Int
findFirstSetBitDenotation = ByteString -> Int
Bitwise.findFirstSetBit
{-# INLINE findFirstSetBitDenotation #-}
in (ByteString -> Int)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> Int)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> Int)
-> (cost -> FoldArgs (GetArgs (ByteString -> Int)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> Int
findFirstSetBitDenotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramFindFirstSetBit)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
Ripemd_160 =
let ripemd_160Denotation :: BS.ByteString -> BS.ByteString
ripemd_160Denotation :: ByteString -> ByteString
ripemd_160Denotation = ByteString -> ByteString
Hash.ripemd_160
{-# INLINE ripemd_160Denotation #-}
in (ByteString -> ByteString)
-> (BuiltinCostModel
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(ByteString -> ByteString)
-> (cost
-> FoldArgs (GetArgs (ByteString -> ByteString)) ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
ByteString -> ByteString
ripemd_160Denotation
(CostingFun ModelOneArgument -> ByteString -> ExBudgetStream
forall a1.
ExMemoryUsage a1 =>
CostingFun ModelOneArgument -> a1 -> ExBudgetStream
runCostingFunOneArgument (CostingFun ModelOneArgument -> ByteString -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelOneArgument)
-> BuiltinCostModel
-> ByteString
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelOneArgument
forall (f :: * -> *). BuiltinCostModelBase f -> f ModelOneArgument
paramRipemd_160)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
_semvar DefaultFun
ExpModInteger =
let expModIntegerDenotation :: Integer -> Integer -> Natural -> BuiltinResult Natural
expModIntegerDenotation :: Integer -> Integer -> Natural -> BuiltinResult Natural
expModIntegerDenotation = Integer -> Integer -> Natural -> BuiltinResult Natural
ExpMod.expMod
{-# INLINE expModIntegerDenotation #-}
in (Integer -> Integer -> Natural -> BuiltinResult Natural)
-> (BuiltinCostModel
-> FoldArgs
(GetArgs (Integer -> Integer -> Natural -> BuiltinResult Natural))
ExBudgetStream)
-> BuiltinMeaning val BuiltinCostModel
forall cost.
(Integer -> Integer -> Natural -> BuiltinResult Natural)
-> (cost
-> FoldArgs
(GetArgs (Integer -> Integer -> Natural -> BuiltinResult Natural))
ExBudgetStream)
-> BuiltinMeaning val cost
forall a val cost.
MakeBuiltinMeaning a val =>
a
-> (cost -> FoldArgs (GetArgs a) ExBudgetStream)
-> BuiltinMeaning val cost
makeBuiltinMeaning
Integer -> Integer -> Natural -> BuiltinResult Natural
expModIntegerDenotation
(CostingFun ModelThreeArguments
-> Integer -> Integer -> Natural -> ExBudgetStream
forall a1 a2 a3.
(ExMemoryUsage a1, ExMemoryUsage a2, ExMemoryUsage a3) =>
CostingFun ModelThreeArguments -> a1 -> a2 -> a3 -> ExBudgetStream
runCostingFunThreeArguments (CostingFun ModelThreeArguments
-> Integer -> Integer -> Natural -> ExBudgetStream)
-> (BuiltinCostModel -> CostingFun ModelThreeArguments)
-> BuiltinCostModel
-> Integer
-> Integer
-> Natural
-> ExBudgetStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BuiltinCostModel -> CostingFun ModelThreeArguments
forall (f :: * -> *).
BuiltinCostModelBase f -> f ModelThreeArguments
paramExpModInteger)
{-# INLINE toBuiltinMeaning #-}
instance Default (BuiltinSemanticsVariant DefaultFun) where
def :: BuiltinSemanticsVariant DefaultFun
def = BuiltinSemanticsVariant DefaultFun
forall a. Bounded a => a
maxBound
instance Pretty (BuiltinSemanticsVariant DefaultFun) where
pretty :: forall ann. BuiltinSemanticsVariant DefaultFun -> Doc ann
pretty = BuiltinSemanticsVariant DefaultFun -> Doc ann
forall a ann. Show a => a -> Doc ann
viaShow
builtinTagWidth :: NumBits
builtinTagWidth :: Int
builtinTagWidth = Int
7
encodeBuiltin :: Word8 -> Flat.Encoding
encodeBuiltin :: Word8 -> Encoding
encodeBuiltin = Int -> Word8 -> Encoding
eBits Int
builtinTagWidth
decodeBuiltin :: Get Word8
decodeBuiltin :: Get Word8
decodeBuiltin = Int -> Get Word8
dBEBits8 Int
builtinTagWidth
instance Flat DefaultFun where
encode :: DefaultFun -> Encoding
encode = Word8 -> Encoding
encodeBuiltin (Word8 -> Encoding)
-> (DefaultFun -> Word8) -> DefaultFun -> Encoding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. \case
DefaultFun
AddInteger -> Word8
0
DefaultFun
SubtractInteger -> Word8
1
DefaultFun
MultiplyInteger -> Word8
2
DefaultFun
DivideInteger -> Word8
3
DefaultFun
QuotientInteger -> Word8
4
DefaultFun
RemainderInteger -> Word8
5
DefaultFun
ModInteger -> Word8
6
DefaultFun
EqualsInteger -> Word8
7
DefaultFun
LessThanInteger -> Word8
8
DefaultFun
LessThanEqualsInteger -> Word8
9
DefaultFun
AppendByteString -> Word8
10
DefaultFun
ConsByteString -> Word8
11
DefaultFun
SliceByteString -> Word8
12
DefaultFun
LengthOfByteString -> Word8
13
DefaultFun
IndexByteString -> Word8
14
DefaultFun
EqualsByteString -> Word8
15
DefaultFun
LessThanByteString -> Word8
16
DefaultFun
LessThanEqualsByteString -> Word8
17
DefaultFun
Sha2_256 -> Word8
18
DefaultFun
Sha3_256 -> Word8
19
DefaultFun
Blake2b_256 -> Word8
20
DefaultFun
VerifyEd25519Signature -> Word8
21
DefaultFun
AppendString -> Word8
22
DefaultFun
EqualsString -> Word8
23
DefaultFun
EncodeUtf8 -> Word8
24
DefaultFun
DecodeUtf8 -> Word8
25
DefaultFun
IfThenElse -> Word8
26
DefaultFun
ChooseUnit -> Word8
27
DefaultFun
Trace -> Word8
28
DefaultFun
FstPair -> Word8
29
DefaultFun
SndPair -> Word8
30
DefaultFun
ChooseList -> Word8
31
DefaultFun
MkCons -> Word8
32
DefaultFun
HeadList -> Word8
33
DefaultFun
TailList -> Word8
34
DefaultFun
NullList -> Word8
35
DefaultFun
ChooseData -> Word8
36
DefaultFun
ConstrData -> Word8
37
DefaultFun
MapData -> Word8
38
DefaultFun
ListData -> Word8
39
DefaultFun
IData -> Word8
40
DefaultFun
BData -> Word8
41
DefaultFun
UnConstrData -> Word8
42
DefaultFun
UnMapData -> Word8
43
DefaultFun
UnListData -> Word8
44
DefaultFun
UnIData -> Word8
45
DefaultFun
UnBData -> Word8
46
DefaultFun
EqualsData -> Word8
47
DefaultFun
MkPairData -> Word8
48
DefaultFun
MkNilData -> Word8
49
DefaultFun
MkNilPairData -> Word8
50
DefaultFun
SerialiseData -> Word8
51
DefaultFun
VerifyEcdsaSecp256k1Signature -> Word8
52
DefaultFun
VerifySchnorrSecp256k1Signature -> Word8
53
DefaultFun
Bls12_381_G1_add -> Word8
54
DefaultFun
Bls12_381_G1_neg -> Word8
55
DefaultFun
Bls12_381_G1_scalarMul -> Word8
56
DefaultFun
Bls12_381_G1_equal -> Word8
57
DefaultFun
Bls12_381_G1_compress -> Word8
58
DefaultFun
Bls12_381_G1_uncompress -> Word8
59
DefaultFun
Bls12_381_G1_hashToGroup -> Word8
60
DefaultFun
Bls12_381_G2_add -> Word8
61
DefaultFun
Bls12_381_G2_neg -> Word8
62
DefaultFun
Bls12_381_G2_scalarMul -> Word8
63
DefaultFun
Bls12_381_G2_equal -> Word8
64
DefaultFun
Bls12_381_G2_compress -> Word8
65
DefaultFun
Bls12_381_G2_uncompress -> Word8
66
DefaultFun
Bls12_381_G2_hashToGroup -> Word8
67
DefaultFun
Bls12_381_millerLoop -> Word8
68
DefaultFun
Bls12_381_mulMlResult -> Word8
69
DefaultFun
Bls12_381_finalVerify -> Word8
70
DefaultFun
Keccak_256 -> Word8
71
DefaultFun
Blake2b_224 -> Word8
72
DefaultFun
IntegerToByteString -> Word8
73
DefaultFun
ByteStringToInteger -> Word8
74
DefaultFun
AndByteString -> Word8
75
DefaultFun
OrByteString -> Word8
76
DefaultFun
XorByteString -> Word8
77
DefaultFun
ComplementByteString -> Word8
78
DefaultFun
ReadBit -> Word8
79
DefaultFun
WriteBits -> Word8
80
DefaultFun
ReplicateByte -> Word8
81
DefaultFun
ShiftByteString -> Word8
82
DefaultFun
RotateByteString -> Word8
83
DefaultFun
CountSetBits -> Word8
84
DefaultFun
FindFirstSetBit -> Word8
85
DefaultFun
Ripemd_160 -> Word8
86
DefaultFun
ExpModInteger -> Word8
87
decode :: Get DefaultFun
decode = Word8 -> Get DefaultFun
forall {a} {f :: * -> *}.
(Eq a, Num a, MonadFail f, Show a) =>
a -> f DefaultFun
go (Word8 -> Get DefaultFun) -> Get Word8 -> Get DefaultFun
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Get Word8
decodeBuiltin
where go :: a -> f DefaultFun
go a
0 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
AddInteger
go a
1 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
SubtractInteger
go a
2 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
MultiplyInteger
go a
3 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
DivideInteger
go a
4 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
QuotientInteger
go a
5 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
RemainderInteger
go a
6 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ModInteger
go a
7 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
EqualsInteger
go a
8 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
LessThanInteger
go a
9 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
LessThanEqualsInteger
go a
10 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
AppendByteString
go a
11 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ConsByteString
go a
12 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
SliceByteString
go a
13 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
LengthOfByteString
go a
14 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
IndexByteString
go a
15 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
EqualsByteString
go a
16 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
LessThanByteString
go a
17 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
LessThanEqualsByteString
go a
18 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Sha2_256
go a
19 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Sha3_256
go a
20 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Blake2b_256
go a
21 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
VerifyEd25519Signature
go a
22 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
AppendString
go a
23 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
EqualsString
go a
24 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
EncodeUtf8
go a
25 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
DecodeUtf8
go a
26 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
IfThenElse
go a
27 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ChooseUnit
go a
28 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Trace
go a
29 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
FstPair
go a
30 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
SndPair
go a
31 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ChooseList
go a
32 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
MkCons
go a
33 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
HeadList
go a
34 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
TailList
go a
35 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
NullList
go a
36 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ChooseData
go a
37 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ConstrData
go a
38 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
MapData
go a
39 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ListData
go a
40 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
IData
go a
41 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
BData
go a
42 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
UnConstrData
go a
43 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
UnMapData
go a
44 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
UnListData
go a
45 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
UnIData
go a
46 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
UnBData
go a
47 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
EqualsData
go a
48 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
MkPairData
go a
49 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
MkNilData
go a
50 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
MkNilPairData
go a
51 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
SerialiseData
go a
52 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
VerifyEcdsaSecp256k1Signature
go a
53 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
VerifySchnorrSecp256k1Signature
go a
54 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G1_add
go a
55 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G1_neg
go a
56 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G1_scalarMul
go a
57 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G1_equal
go a
58 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G1_compress
go a
59 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G1_uncompress
go a
60 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G1_hashToGroup
go a
61 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G2_add
go a
62 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G2_neg
go a
63 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G2_scalarMul
go a
64 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G2_equal
go a
65 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G2_compress
go a
66 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G2_uncompress
go a
67 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_G2_hashToGroup
go a
68 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_millerLoop
go a
69 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_mulMlResult
go a
70 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Bls12_381_finalVerify
go a
71 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Keccak_256
go a
72 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Blake2b_224
go a
73 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
IntegerToByteString
go a
74 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ByteStringToInteger
go a
75 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
AndByteString
go a
76 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
OrByteString
go a
77 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
XorByteString
go a
78 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ComplementByteString
go a
79 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ReadBit
go a
80 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
WriteBits
go a
81 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ReplicateByte
go a
82 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ShiftByteString
go a
83 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
RotateByteString
go a
84 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
CountSetBits
go a
85 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
FindFirstSetBit
go a
86 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
Ripemd_160
go a
87 = DefaultFun -> f DefaultFun
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DefaultFun
ExpModInteger
go a
t = String -> f DefaultFun
forall a. String -> f a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail (String -> f DefaultFun) -> String -> f DefaultFun
forall a b. (a -> b) -> a -> b
$ String
"Failed to decode builtin tag, got: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ a -> String
forall a. Show a => a -> String
show a
t
size :: DefaultFun -> Int -> Int
size DefaultFun
_ Int
n = Int
n Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
builtinTagWidth