packages feed

lorentz 0.13.1 → 0.13.2

raw patch · 5 files changed

+13/−7 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Lorentz: createContract :: forall p g vd s. Contract p g vd -> (Maybe KeyHash : (Mutez : (g : s))) :-> (Operation : (Address : s))
+ Lorentz: createContract :: forall p g vd s. Contract p g vd -> (Maybe KeyHash : (Mutez : (g : s))) :-> (Operation : (TAddress p vd : s))
- Lorentz: createContractE :: ("delegate" :! Expr s0 s1 (Maybe KeyHash)) -> ("balance" :! Expr s1 s2 Mutez) -> ("storage" :! Expr s2 s3 st) -> ("contract" :! Contract p st vd) -> Expr s0 (Address : s3) Operation
+ Lorentz: createContractE :: ("delegate" :! Expr s0 s1 (Maybe KeyHash)) -> ("balance" :! Expr s1 s2 Mutez) -> ("storage" :! Expr s2 s3 st) -> ("contract" :! Contract p st vd) -> Expr s0 (TAddress p vd : s3) Operation
- Lorentz.Expr: createContractE :: ("delegate" :! Expr s0 s1 (Maybe KeyHash)) -> ("balance" :! Expr s1 s2 Mutez) -> ("storage" :! Expr s2 s3 st) -> ("contract" :! Contract p st vd) -> Expr s0 (Address : s3) Operation
+ Lorentz.Expr: createContractE :: ("delegate" :! Expr s0 s1 (Maybe KeyHash)) -> ("balance" :! Expr s1 s2 Mutez) -> ("storage" :! Expr s2 s3 st) -> ("contract" :! Contract p st vd) -> Expr s0 (TAddress p vd : s3) Operation
- Lorentz.Instr: createContract :: forall p g vd s. Contract p g vd -> (Maybe KeyHash : (Mutez : (g : s))) :-> (Operation : (Address : s))
+ Lorentz.Instr: createContract :: forall p g vd s. Contract p g vd -> (Maybe KeyHash : (Mutez : (g : s))) :-> (Operation : (TAddress p vd : s))

Files

CHANGES.md view
@@ -1,5 +1,11 @@ <!-- Unreleased: append new entries here --> ++0.13.2+======+* [!1041](https://gitlab.com/morley-framework/morley/-/merge_requests/1041)+  `createContract` now returns `TAddress`, not `Address`+ 0.13.1 ====== * [!1016](https://gitlab.com/morley-framework/morley/-/merge_requests/1016)
README.md view
@@ -15,10 +15,10 @@  Haskell's type checker and automatic type inference facilitate contracts implementation and reduce boilerplate related to types. Adoption of Algebraic Data Types makes work with complex objects safe and convenient.-Later Lorentz contract can be dumped as a plain textual Michelson contract using functions from [`Morley.Michelson.Printer`](http://hackage.haskell.org/package/morley/docs/Michelson-Printer.html).+Later Lorentz contract can be dumped as a plain textual Michelson contract using functions from [`Morley.Michelson.Printer`](http://hackage.haskell.org/package/morley/docs/Morley-Michelson-Printer.html).  As an addition, you can optimize the transpiled Michelson contract before printing-using functions from [`Morley.Michelson.Optimizer`](http://hackage.haskell.org/package/morley/docs/Michelson-Optimizer.html).+using functions from [`Morley.Michelson.Optimizer`](http://hackage.haskell.org/package/morley/docs/Morley-Michelson-Optimizer.html). E.g. this optimizer will replace `IF {} {}` with `DROP`. For more possible optimizations please refer to the module mentioned earlier. @@ -109,7 +109,7 @@    Lorentz provides primitives for embedding documentation in the contract code and   functions to produce documentation in Markdown, they can be found in-  [`Lorentz.Doc`](http://hackage.haskell.org/package/lorentz/docs/Lorentz-Doc.html) and [`Morley.Michelson.Doc`](http://hackage.haskell.org/package/morley/docs/Michelson-Doc.html) modules.+  [`Lorentz.Doc`](http://hackage.haskell.org/package/lorentz/docs/Lorentz-Doc.html) and [`Morley.Michelson.Doc`](http://hackage.haskell.org/package/morley/docs/Morley-Michelson-Doc.html) modules.   Documentation examples can be found [here](https://gitlab.com/morley-framework/morley/-/tree/autodoc/master/autodoc).  <a name="lorentz-example"></a>@@ -200,7 +200,7 @@ <!-- This question should be removed once https://gitlab.com/morley-framework/morley/issues/79 is resolved --> * Q: I added a new parameter case to contract and GHC went mad. -  A: Ensure that your number of entry points does not exceed the limit set in [`Morley.Util.TypeTuple.Instances`](http://hackage.haskell.org/package/morley/docs/Util-TypeTuple-Instances.html).+  A: Ensure that your number of entry points does not exceed the limit set in [`Morley.Util.TypeTuple.Instances`](http://hackage.haskell.org/package/morley/docs/Morley-Util-TypeTuple-Instances.html).  * Q: I added one more datatype that is used in the contract and GHC reports with errors related      to `Rep` type family.
lorentz.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           lorentz-version:        0.13.1+version:        0.13.2 synopsis:       EDSL for the Michelson Language description:    Lorentz is a powerful meta-programming tool which allows one to write Michelson contracts directly in Haskell. It has the same instructions as Michelson, but operates on Haskell values and allows one to use Haskell features. category:       Language
src/Lorentz/Expr.hs view
@@ -332,7 +332,7 @@   -> ("balance" :! Expr s1 s2 Mutez)   -> ("storage" :! Expr s2 s3 st)   -> ("contract" :! Contract p st vd)-  -> Expr s0 (Address : s3) Operation+  -> Expr s0 (TAddress p vd : s3) Operation createContractE (N delegatorE)                 (N balanceE)                 (N storageE)
src/Lorentz/Instr.hs view
@@ -737,7 +737,7 @@ createContract   :: forall p g vd s. Contract p g vd   -> Maybe KeyHash : Mutez : g : s-  :-> Operation : Address : s+  :-> Operation : TAddress p vd : s createContract cntrc@Contract{} =   I $ CREATE_CONTRACT (toMichelsonContract cntrc)     \\ niceParameterEvi @p