Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type BuiltinCostModel = BuiltinCostModelBase CostingFun
-
data
BuiltinCostModelBase
f =
BuiltinCostModelBase
{
- paramAddInteger :: f ModelTwoArguments
- paramSubtractInteger :: f ModelTwoArguments
- paramMultiplyInteger :: f ModelTwoArguments
- paramDivideInteger :: f ModelTwoArguments
- paramQuotientInteger :: f ModelTwoArguments
- paramRemainderInteger :: f ModelTwoArguments
- paramModInteger :: f ModelTwoArguments
- paramEqualsInteger :: f ModelTwoArguments
- paramLessThanInteger :: f ModelTwoArguments
- paramLessThanEqualsInteger :: f ModelTwoArguments
- paramAppendByteString :: f ModelTwoArguments
- paramConsByteString :: f ModelTwoArguments
- paramSliceByteString :: f ModelThreeArguments
- paramLengthOfByteString :: f ModelOneArgument
- paramIndexByteString :: f ModelTwoArguments
- paramEqualsByteString :: f ModelTwoArguments
- paramLessThanByteString :: f ModelTwoArguments
- paramLessThanEqualsByteString :: f ModelTwoArguments
- paramSha2_256 :: f ModelOneArgument
- paramSha3_256 :: f ModelOneArgument
- paramBlake2b_256 :: f ModelOneArgument
- paramVerifyEd25519Signature :: f ModelThreeArguments
- paramVerifyEcdsaSecp256k1Signature :: f ModelThreeArguments
- paramVerifySchnorrSecp256k1Signature :: f ModelThreeArguments
- paramAppendString :: f ModelTwoArguments
- paramEqualsString :: f ModelTwoArguments
- paramEncodeUtf8 :: f ModelOneArgument
- paramDecodeUtf8 :: f ModelOneArgument
- paramIfThenElse :: f ModelThreeArguments
- paramChooseUnit :: f ModelTwoArguments
- paramTrace :: f ModelTwoArguments
- paramFstPair :: f ModelOneArgument
- paramSndPair :: f ModelOneArgument
- paramChooseList :: f ModelThreeArguments
- paramMkCons :: f ModelTwoArguments
- paramHeadList :: f ModelOneArgument
- paramTailList :: f ModelOneArgument
- paramNullList :: f ModelOneArgument
- paramChooseData :: f ModelSixArguments
- paramConstrData :: f ModelTwoArguments
- paramMapData :: f ModelOneArgument
- paramListData :: f ModelOneArgument
- paramIData :: f ModelOneArgument
- paramBData :: f ModelOneArgument
- paramUnConstrData :: f ModelOneArgument
- paramUnMapData :: f ModelOneArgument
- paramUnListData :: f ModelOneArgument
- paramUnIData :: f ModelOneArgument
- paramUnBData :: f ModelOneArgument
- paramEqualsData :: f ModelTwoArguments
- paramMkPairData :: f ModelTwoArguments
- paramMkNilData :: f ModelOneArgument
- paramMkNilPairData :: f ModelOneArgument
- paramSerialiseData :: f ModelOneArgument
-
data
CostingFun
model =
CostingFun
{
- costingFunCpu :: model
- costingFunMemory :: model
- data ModelAddedSizes = ModelAddedSizes { }
- data ModelSubtractedSizes = ModelSubtractedSizes { }
- data ModelConstantOrLinear = ModelConstantOrLinear { }
- data ModelConstantOrTwoArguments = ModelConstantOrTwoArguments { }
- data ModelLinearSize = ModelLinearSize { }
- data ModelMultipliedSizes = ModelMultipliedSizes { }
- data ModelMinSize = ModelMinSize { }
- data ModelMaxSize = ModelMaxSize { }
- data ModelOneArgument
-
data
ModelTwoArguments
- = ModelTwoArgumentsConstantCost CostingInteger
- | ModelTwoArgumentsLinearInX ModelLinearSize
- | ModelTwoArgumentsLinearInY ModelLinearSize
- | ModelTwoArgumentsAddedSizes ModelAddedSizes
- | ModelTwoArgumentsSubtractedSizes ModelSubtractedSizes
- | ModelTwoArgumentsMultipliedSizes ModelMultipliedSizes
- | ModelTwoArgumentsMinSize ModelMinSize
- | ModelTwoArgumentsMaxSize ModelMaxSize
- | ModelTwoArgumentsLinearOnDiagonal ModelConstantOrLinear
- | ModelTwoArgumentsConstAboveDiagonal ModelConstantOrTwoArguments
- | ModelTwoArgumentsConstBelowDiagonal ModelConstantOrTwoArguments
- data ModelThreeArguments
- data ModelFourArguments = ModelFourArgumentsConstantCost CostingInteger
- data ModelFiveArguments = ModelFiveArgumentsConstantCost CostingInteger
- data ModelSixArguments = ModelSixArgumentsConstantCost CostingInteger
- runCostingFunOneArgument :: CostingFun ModelOneArgument -> ExMemory -> ExBudget
- runCostingFunTwoArguments :: CostingFun ModelTwoArguments -> ExMemory -> ExMemory -> ExBudget
- runCostingFunThreeArguments :: CostingFun ModelThreeArguments -> ExMemory -> ExMemory -> ExMemory -> ExBudget
- runCostingFunFourArguments :: CostingFun ModelFourArguments -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExBudget
- runCostingFunFiveArguments :: CostingFun ModelFiveArguments -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExBudget
- runCostingFunSixArguments :: CostingFun ModelSixArguments -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExBudget
- class Hashable a
- newtype MCostingFun a = MCostingFun ( Maybe ( CostingFun a))
Documentation
data BuiltinCostModelBase f Source #
Instances
data CostingFun model Source #
CostingFun | |
|
Instances
data ModelAddedSizes Source #
s * (x + y) + I
Instances
data ModelSubtractedSizes Source #
s * (x - y) + I
Instances
data ModelConstantOrLinear Source #
if p then s*x else c; p depends on usage
Instances
data ModelConstantOrTwoArguments Source #
if p then f(x,y) else c; p depends on usage
Instances
data ModelLinearSize Source #
Instances
data ModelMultipliedSizes Source #
s * (x * y) + I
Instances
data ModelMinSize Source #
s * min(x, y) + I
Instances
data ModelMaxSize Source #
s * max(x, y) + I
Instances
data ModelOneArgument Source #
Instances
data ModelTwoArguments Source #
Instances
data ModelThreeArguments Source #
Instances
data ModelFourArguments Source #
Instances
data ModelFiveArguments Source #
Instances
data ModelSixArguments Source #
Instances
runCostingFunTwoArguments :: CostingFun ModelTwoArguments -> ExMemory -> ExMemory -> ExBudget Source #
runCostingFunThreeArguments :: CostingFun ModelThreeArguments -> ExMemory -> ExMemory -> ExMemory -> ExBudget Source #
runCostingFunFourArguments :: CostingFun ModelFourArguments -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExBudget Source #
runCostingFunFiveArguments :: CostingFun ModelFiveArguments -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExBudget Source #
runCostingFunSixArguments :: CostingFun ModelSixArguments -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExMemory -> ExBudget Source #
The class of types that can be converted to a hash value.
Minimal implementation:
hashWithSalt
.
Note: the hash is not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.
If you are looking for
Hashable
instance in
time
package,
check
time-compat
Instances
newtype MCostingFun a Source #
Same as
CostingFun
but maybe missing.
We could use 'Compose Maybe CostinFun' instead but we would then need an orphan ToJSON instance.
MCostingFun ( Maybe ( CostingFun a)) |