Changelog for lorentz-0.16.0
0.16.0
- !1370
Add
OverloadedRecordDotsupport for LorentzStoreClass- Deprecated
StoreClass.Extra, as it does more or less the same thing asOverloadedRecordDot, but a lot worse.
- Deprecated
- !1369
Add
IsLabelandDefaultinstances forEntrypointRef- Now
OverloadedLabelscan be used instead ofCall deffromData.Defaultcan be used instead ofCallDefault
- Now
- !1364 Update to LTS-21.4 (GHC 9.4.5)
- !1358
Make missing
Genericerrors more readable - !1367
Add Range type to Lorentz, see
Lorentz.Rangemodule documentation
0.15.2
- !1362
Add division operators over integral operands returning fractional results
- Fix division for fixed-point arithmetic;
- Add more instances for fixed and rational arithmetic, for better interpop with integrals;
- Optimize fixed-point division;
- Add
Real NFixedinstance for convenience; - Fix bitshift operations for fixed-point arithmetic;
- Fix division between
Rational(orNRational) andNatural;
- !1342
Replace fmt with prettyprinter
- Removed trivial
Buildableinstance for:->in favor of the default one
- Removed trivial
- !1341
Refactor scope constraints
- Avoid redundant
check*Presenceuses - Improve error messages with
Nice*constraints
- Avoid redundant
- !1340
Remove deprecated types and functions
defaultAnnOptionsdropPrefixThenhaskellRepStripFieldPrefix
0.15.1
- !1325
Add
AND,NOT,OR,XOR,LSLandLSRoperations support onbytes - !1326
Add support for bytes to nat and int conversions
- Support
natandbytesinstructions, and the new operands tointinstruction.
- Support
- !1331
Support implicit account tickets
- Allow tickets as parameter to
ImplicitAddressinToTAddress;
- Allow tickets as parameter to
- !1328
Kill support for TORUs, minimal sr1 address support, tz4 address support
- Module
Lorentz.Txr1Callremoved.
- Module
- !1314 Preserve docs after failWith
- !1289
Simplify/fix ReferencedByName
dupLanddupLNamedcould under some specific circumstances crash at runtime due to not-always-valid unsafe coercions. The unsafe coercions have been removed.
- !1235
Make it easier to have consistent field naming between HasAnnotation and
TypeHasDoc
- Require newly introduced
TypeHasFieldNamingStrategyconstraint in the default implementationannOptions. Apply the strategy as appropriate. - Add an optional field to
typeDocwhich allows specifying the strategy. - See also the corresponding
morleychangelog.
- Require newly introduced
0.15.0
- !1273
Add LAMBDA_REC and Lambda_rec support
framedinstruction moved toLorentz.Instr.Framed(re-exported fromLorentz.Instr).IsoValueandHasAnnotationinstances for(:->)are replaced with type-errored ones, as Lorentz code is no longer isomorphic to lambdas.TypeHasDocinstance for(:->)removed.WrappedLambdais now a sum datatype.unWrappedLambdaremoved, as recursive lambdas can't be unwrapped like that.- All lambda-related instances moved to
Lorentz.Lambda. lambdaRecinstruction introduced.mkLambdaRechelper for constructing recursive lambda values introduced.
- !1278 Deprecate timelock-related functions
- !1270
Add lima protocol TICKET instruction, rename old one to TICKET_DEPRECATED
- The
TICKETinstruction was renamed toTICKET_DEPRECATED - A new
TICKETinstruction was added which no longer allows zero amount tickets. It now returnsSome TicketandNonein case of zero amount supplied.
- The
- !1267 Added Lorentz.ADT doctests examples / tests
- !1271
Miscellaneous chores
- Add Buildable instances for
ZippedStackReprandZSNil. - Export
DupTandDipTclasses fromLorentz.Referenced.
- Add Buildable instances for
- !1252 Better errors on stuck GetEntrypointArgCustom
- !1233 Rename Lorentz.Rebinded to Lorentz.Rebound
- !1242
Use
Constrainedutility existential - !1180 Implement lmap for more types, and change signature of the typeclass to be more pure.
- !1178
Add
HasNoNestedBigMaps tconstraint where required.- These constraint were missing on TZIP-16 views, but effectively it is
required by the network for callbacks. This is a consequence of adding this
constraint to
Contract tin Morley.
- These constraint were missing on TZIP-16 views, but effectively it is
required by the network for callbacks. This is a consequence of adding this
constraint to
- !1222
Change the constraints on
constructStackanddeconstructinLorentz.ADT, and ondocumentEntrypointsinLorentz.Entrypoints.Doc. Code using them in surprisingly polymorphic ways may need minor adjustments. Applications of these functions should now be faster to typecheck and also faster to run. - !1216
Remove
KnownListconstraints fromeuclidExtendedNormalizationandreduceRationalHelperinLorentz.CustomArith.RationalArith. - !1198
Implement
dipTusingdipNfor performance. This change also allowsdipTto be used without an explicit type argument when enough is known about the passed stack action. Do the same fordupT, usingdupN.
0.14.1
- !1214 Add emit instructions
- !1202 Make type errors less confusing when types are ambiguous
- !1177 Distinguish implicit/contract aliases and addresses on the type level
- !1136
Add
idivandimodmacros to Lorentz. - !1181
Add a few missing instances
CanCastToinstances forZippedStackReprandWrappedLambda,GenericandMapLorentzInstrinstances forWrappedLambda,HasAnnotationinstances forZippedStackRepr.
0.14.0
- !1123 Remove deprecated exports
- !1169
Support MIN_BLOCK_TIME instruction
- Add the corresponding Lorentz
minBlockTimeinstruction.
- Add the corresponding Lorentz
- !1158
Refactor (out) annotation checking support
iWithVarAnnotationsremoved.- Initial cast in lorentz contracts is redundant since annotations are ignored, hence it is removed.
- Hence,
coDisableInitialCastandcoDisableInitialCastLare removed.
- !1163
Prohibit some operations in views
ContractCodeis now a newtype wrapper instead of type synonym; this is required to avoid accidentally pasting contract code in views.- Lorentz lambdas are now newtype-wrapped with
WrappedLambda, for the same reason. Lambdais a type synonym forWrappedLambdawith singleton input and output stacks.- The old
Lambdasynonym (which was a sequence of instructions with singleton i/o stacks) is renamed toFn. - New "smart" constructors,
mkContractCodeandmkLambda, which conjure the required constraints.
- !1153 Remove 'OpSize' module.
- !1114 Update to ghc-9.0.2
- !1108 Remove support for the deprecated morley extensions
- !1007
Add
Rationaldatatype in Lorentz and arithmetic operations with it- Move all custom arithmetics in Lorentz the a separate module
- !1146
Optimize
lmapforMaybe. - !1111
Add
errorDocArg, deprecateerrorDoc- Added
errorDocArg, a quasi-quoter replacingerrorDoc. The main difference iserrorDocArgallows optionally specifying the error argument type. - Since
errorDocArgsubsumeserrorDoc, the latter is deprecated.
- Added
0.13.4
- !1078
Option to flatten EpdRecursive entrypoints in autodoc
- New entrypoint kind
FlattenedEntrypointsKindHiding, which flattens entrypoints in autodoc and allows hiding specific constructors. For other intents it's the same asPlainEntrypointsKind. - Convenience synonym
FlattenedEntrypointsKindfor cases where no hiding is necessary. - New convenience functions
entryCaseFlattenedandentryCaseFlattenedHiding. - Deprecate redundant
constructDEpArg, usemkDEntrypointArgSimpleinstead.
- New entrypoint kind
- !1104
Use clearer notation for (-$)
- Introduce new data types
ZippedStackRepr a b = a ::: bandZSNil = ZSNil, isomorphic to '(a, b)' and '()' respectively, to represent a zipped stack.
- Introduce new data types
- !1082 Fix/drop/comment noncanonical Show instances
- !841 Make entrypoints derivation work with void-like entrypoint arguments.
0.13.3
- !1100
Support
mapinstruction overMaybe(a.k.a.option)- Add
instance MapOpHs (Maybe e)
- Add
- !1084 Switch to the new mutez subtraction operation
- !1101
Export
sopSetFieldandsopGetFieldfromLorentz.StoreClass - !1089
Enhance and rename mutez quasiquote
- Export
tzquasiquoter fromLorentz.ValueandLorentz.
- Export
- !1071
Add
HasRPCReprtypeclass- Move
AsRPCtype instances from theLorentz.AsRPCmodule to the modules of their respective types.
- Move
- !901
Weaken constraints of
getFieldgetFieldand similar methods now requireDupableon the copied field andHasDupableGetters(defaults toDupable) on the datatype.
- !1060
Add
Lorentz.AsRPCmodule containing instances forMorley.AsRPCtype family - !978
Make it difficult to misuse 'Show'
- Use
Buildableandprettypreferrentially. - Avoid using
(+||)and(||+). - Use
Debug.showwhen definingShowinstances.
- Use
- !1062
Move
senderIsNotAdminLorenz error tomorley-ledgersrepo - !997
Check necessity in initial
castautomatically in Lorentz contracts - !1043 Extract actual + expected pattern into a datatype and show diff in type mismatch
- !1037
Add synonyms for
SomeConstrainedValue- Reimplement
SomeConstant,SomeValue,SomeStorageviaSomeConstrainedValue. - Add
SomePackedVal = SomeConstrainedValue PackedValScope.
- Reimplement
- !1049
Delete unnecessary
HasStorageconstraintsLorentz.Contractno longer requiresParameterDeclaresEntrypointsorHasAnnotation st.- Added
NiceStorageFullconstraint for whenHasAnnotation stis actually needed.
0.13.2
- !1041
createContractnow returnsTAddress, notAddress
0.13.1
- !1016
- Add support for on-chain views.
Contract,TAddressand similar types has gained a new type argument designating the views set exposed by the contract. By default, set it to().- The old A1 (aka TZIP-4) views -
Viewtype and related methods - were renamed via adding a_suffix:View_,mkView_,wrapView_, e.t.c.
- !1010
Add timelock puzzle support.
- Add Lorentz instruction
openChest. - Add
OpenChesttype, isomorphic toEither ByteString Bool - Add Lorentz types
ChestT,OpenChestT, abstracting working with any type representable asByteString(defined inLorentz.Bytes). - Add
openChestTLorentz instruction for working withChestT(defined inLorentz.Bytes)
- Add Lorentz instruction
0.13.0
- !915
- Add Fixedpoint arithmetics to lorentz
- Add additional
NFixeddatatype for natural fixedpoint values - Add typeclasses for rounding and casting fixedpoint values
- Change behavior of lorentz arithmetic operations - now type of the result is specified by user.
- Add
ArithOpHsinstance forEDivinstruction
- !989
Switch from interpolate to home-grown string interpolation module
- Note this changes the syntax of slices in
mdquasiquoter. Before we could use expressions#{expression}, now we can only use variable names#{name}.
- Note this changes the syntax of slices in
- !909
- Update all instances of
Namedfunctions with patterns fromMorley.Util.Named
- Update all instances of
- !1000
Modify the
cloneXmacro to only usedups. - !937
Attach source code location to interpreter error messages
- Changed morley interpreter error type from
MichelsonFailedtoMichelsonFailureWithStack
- Changed morley interpreter error type from
- !945
- Bump Stackage LTS version from 17.9 to 18.10.
- !835
- Added
Lorentz.Ticketsmodule with tickets arithmetics and common helpers. - Added
Impossibleerror. - Added
transferTokensEandpairE. - Moved
NonZerotoLorentz.Macro. - Updated
Wrappable:- Make separate
WrappableandUnwrappabletypeclasses. - Old
Unwrappabletype family renamed toUnwrappabled. - Weaked permissions to perform some actions for some types.
May now require
unsafeCoerceWrapinstead ofcoerceWrap.
- Make separate
- Added
- !922 Replace lSignEd22519 with generic lSign
- !881
- Rename
PrintedValScopetoUntypedValScopewith related types and functions.
- Rename
0.12.1
- !879
- Add
BuildableandRenderDocinstances for(:->)operator - Instances are based on transforming operator to
Instrtype and using its instances
- Add
0.12.0
-
StoreHasFieldinstance definition is no more necessary for simple ADT storage types.
-
- Reorganized
Contracttype and related stuff. - Added methods for reading
Contractfrom file.
Migration guide (sufficient unless you worked on framework internals):
- In case you needed to use non-default contract compilation options, use
mkContractWithnow.
For more details, see documentation of
Lorentz.Run. - Reorganized
-
- Add tickets feature.
- Add dupable restriction to
dup-like instructions and some high-level helpers. Seedup's documentation for notes on how to live in this brand new world. - Make
parseNoEnv,readValueand other similar functions acceptMichelsonSourceinstead ofFilePath.
-
- All unsafe functions and data constructors now contain "unsafe" word
at prefix position. E.g
UnsafeMText,unsafeMkAnnotation.
- All unsafe functions and data constructors now contain "unsafe" word
at prefix position. E.g
-
- Added
Lorentz.Exprmodule with primitives for convenient expressions evaluation.- Added
listEto construct an expression list from a list of expressions.
- Added
if ... then ... elsenow is polymorphic in the first argument.- Boolean expressions now can appear as condition for
if.
- Boolean expressions now can appear as condition for
- Added
0.11.0
-
- Added the usage of
Prelude.Typeinstead ofData.Kind.Type, as a resultKind.Typewas replaced with justType.
- Added the usage of
-
-
Generalize
st*methods for working with storage. Now it is possible to access nested fields and submaps likestToField (#a :-| #b). This should not require any changes unless you keep you own generic helpers over those methods. -
Existing
StoreHasSubmap (Big?)Map anyName k vinstance is replaced with two:StoreHasSubmap (Big?)Map Self k vStoreHasSubmap store name k vthat delegates toStoreHasField.
Migration guide:
- If you have
StoreHasSubmapinstances for specific storage and name implemented viastoreSubmapOpsDeeper, remove them and make sure you have a similarStoreHasFieldinstance implemented viastoreFieldOpsADT. - If you have storage which is directly a map, use
thisinstead of label to access the map. - If you have an instance for a complex storage which is not represented as simple ADT,
turn this instance into overlappable one. Make sure that
nametype parameter is of concrete type to avoid "overlapping instances" error. - The pattern when a datatype transparently provides access to its inner fields via an
overlapping instance - may not work smoothly and produce "overlapping instances" error.
To mitigate this do one of the following:
- Specify the kind of
nametype parameter in your overlapping instance to be concrete (i.e.Symbol). - Use the new functionality to access the nested field by a fully qualified name.
- Specify the kind of
-
-
- Add some instances to
BigMapandTAddresstypes.
- Add some instances to
-
- Added new Edo macros:
CAR kandCDR kascarNandcdrN.
- Added new Edo macros:
-
- Added back the
UnaryArithOpHs Abs Integerinstance that was removed by accident.
- Added back the
-
- Add
NiceParameterFullandNiceStorageconstraints to LorentzContractconstructor. - Moved
coDisableInitialCasttoCompilationOptionsdatatype.
- Add
0.10.0
- !774
- Added support for
BLS12-381crypto primitives (types, instructions, arithmetics). - Now it is possible to use
intinstruction for newtypes overNatural.
- Added support for
- !786
- !791
- Add new Edo instructions:
pairGetandpairUpdate.
- Add new Edo instructions:
- !755
Restricted
FAILWITHonly to packable values, exceptCONTRACTs - !759
- Add
UnitErrorArgandNoErrorArgto be used withErrorArginstance.UnitErrorArgis preferred to()NoErrorArgallows failing with just a string instead of apair string unit.
- Add
- !764
- Added
Nevertype, deprecatedEmptytype.
- Added
0.9.1
- !781
- Replaced mixins and dependency on
basewithbase-noprelude.
- Replaced mixins and dependency on
- !751
- Add new Edo instruction:
LEVEL.
- Add new Edo instruction:
- !741
- Add new Edo instructions:
SHA3andKECCAK.
- Add new Edo instructions:
0.9.0
- !731
Added
GenericStrategy-ies for compatibility with LIGO. - !712 Add lenses for Lorentz contract config.
- !684
- Simplify working with autodoc in contracts (breaking change).
finalizeParamCallingDocis now applied automatically when lorentz'Contractis used, no need to call it manually.
0.8.0
- !671
- Add
TypeHasDocinstances forTAddressandFutureContract. - Add a generic
instance DocItem (DEntrypoint ep). In case of getting overlapping instances, you have to implementEntrypointKindHasDocinstead. - Some error messages in doc tests are improved.
- Some bugfixes for anchors.
- Cases with contract logic residing outside of entrypoints are now better handled.
- Add
- !665
Improve
StorageContainsto work for polymorphic case (when field is marked withIdentity). - !679
Add
dupLNamed. - !672
- Add
Packed,TSignatureandHashtypes. packandunpacknow work withPackedinstead ofByteString(for the sake of better type-safety). Either usePackedtype, orpackRaw/unpackRawinstructions.checkSignaturenow works withPackedandTSignature.blake2band other hashing instructions now work withHash.- If necessary, coersions can be used to switch between the mentioned types and raw
ByteString.
- Add
- !667
- Modify representation of extended lambdas (arbitrary code used as lambdas is now packed into right-hand combs, not left-hand ones).
- Add
applicatemacro.
- !630
Use
:in all library instructions instead of&. - !652
Update the
ContractRegistryto be able to not require contract name for all its commands when there is only one contract. - !640
Change
StoreSubmapOpsto contain no optional methods.
0.7.1
0.7.0
- !629
All
UStoremodules has been moved to the morley-upgradeable repository. Now you have to include that repository to your build and importLorentz.UStore. - !610
Remove
Lorentz.TestScenario. - !585
Add
HasAnnotationinstance forChainId.
0.6.2
- !589
Add
annOptionsmethod inHasAnnotationwhich can be used to customize the generated annotations of a type.- Add helper functions to use with
annOptions.
- Add helper functions to use with
- !591
Add
dupTop2.
0.6.1
- !533
Add
entrypointDoc,typeDoc, anderrorDocquasiquotes which help generating typeclass instances.
0.6.0
- !558
Added a new
wrapOneto wrap a value in a constructor with a single field, because it has the advantage of having an input stack that does not depend on a type family. - !528
The generated documentation now contains a sample value of each entrypoint.
- Allow modification of sample value via
mkDEntrypointExample.
- Allow modification of sample value via
- !493
Add support for root entrypoint.
- A contract can now specify whether or not the root annotation should be generated and which name it should use.
selfandcontractinstructions are able to call the root entrypoint.
0.5.0
- !530
Field annotation are now generated for sum-type in
parameterandstorage.- It also ensures that it will not generate field annotations that would introduce extra entrypoints.
- !371
Make
view_argument accept 2 arguments rather than a pair. - !486
Add
customGenericto deriveGenericinstances with a custom tree structure and, consequently,IsoValueinstances with such a structure. - !483 Add a way to generate field annotations for entrypoint parameter.
- !470
Move
Lorentz.Testand Hedgehog generators to a new package:cleveland. - !357
Remove deprecated
Lorentz.Storemodule and deprecated custom error functionality.
0.4.0
- !449
- Improve
Lorentz.Test.Integrationalinterface. - Remove
IntegrationalValidator,SuccessValidator,validate,composeValidators,composeValidatorsList,expectAnySuccess. - Add
unexpectedInterpreterError,attempt,catchExpectedError. - Change type of
expect*/tExpect*/lExpect*functions. They now returnIntegrationalScenarioinstead ofSuccessValidator/Bool. - Rename
ValidationErrortoTestError - Replace
TestError'sUnexpectedExecutorErrorconstructor withInterpreterErrorandUnexpectedInterpreterError.
- Improve
- !432
Add
whenNoneto Lorentz. - !398
Add
StoreHasEntrypointclass to conveniently use entrypoints as lambdas stored intobig_map(s) to make use of lazy evaluation. - !409
- Add hedgehog support
- !303
- Functions for working with
UStorefrom Haskell world (e.g.fillUStore) now have a different constraint. UStoretemplates are now documented and thus may require instance of the respective typeclass.
- Functions for working with
0.3.0
- !417 Change the license to MIT.
- !360
- Add
compileLorentzWithOptionsfunction that accepts optional Michelson optimizer configuration and string transformer function. ChangedcompileLorentzto call the optimizer with the default configuration. - Add
Lorentz.Contractdata type as a wrapper forLorentz.ContractCodeandLorentz.CompilationOptions. Require that all contracts are wrapped in this data type.
- Add
- !354
- Add
constructStackfunction that constructs a datatype from fields on the stack. - Add
deconstructfunction that deconstructs a datatype to its fields on the stack.
- Add
- !358
Removed deprecated
STEPS_TO_QUOTAinstruction. - !337
Added
comment,commentAroundFunandcommentAroundStmtto generate comments in Michelson code.
0.2.0
- !346
Added
docStorageandcontractGeneralDefault. - !306
Deprecated
mapMigrationCodein favor ofMapLorentzInstr. - !326
Updated contract registry (
Lorentz.ContractRegistry):- Now it can print initial storage apart from contract and documentation.
- Some extra fields were added to
ContractInfo. - Logic is captured in the
runContractRegistryfunction. - If you don't specify output file, we will use a file with name constructed from contract name. Pass
-if you wantstdout.
- !245 Added
HasTypeAnninstance forFutureContract arg. - !294
- Added
Paths_*modules toautogen-modulesin cabal files. Removed-O0 - from default GHC options. Please set
ghc-optionsin yourstack.yamlorcabal.project.local.
- Added
- !271 Renamed 'Contract' to 'ContractCode', and appended "Code" to the names of two functions: 'convertContract' and 'printTypedContract'
- !267
- Retain type annotations in entrypoints derivation.
- Remove overlappable
HasTypeAnninstance defined for nearly each type. AdddefaultgetTypeAnnmethod definition instead and manually defineHasTypeAnninstance for each type instead (trivially). When you create a new data type withIsoValueinstance, you usually have to deriveHasTypeAnnas well.
0.1.0
Initial release extracted from the morley package.