lorentz 0.12.0 → 0.12.1
raw patch · 3 files changed
+15/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Lorentz.Base: instance Formatting.Buildable.Buildable (inp Lorentz.Base.:-> out)
+ Lorentz.Base: instance Michelson.Printer.Util.RenderDoc (inp Lorentz.Base.:-> out)
Files
- CHANGES.md +7/−1
- lorentz.cabal +1/−1
- src/Lorentz/Base.hs +7/−0
CHANGES.md view
@@ -2,9 +2,15 @@ ========== <!-- Append new entries here --> -0.12.0++0.12.1 ======+* [!879](https://gitlab.com/morley-framework/morley/-/merge_requests/879)+ + Add `Buildable` and `RenderDoc` instances for `(:->)` operator+ + Instances are based on transforming operator to `Instr` type and using its instances +0.12.0+====== * [!854](https://gitlab.com/morley-framework/morley/-/merge_requests/854) + `StoreHasField` instance definition is no more necessary for simple ADT storage types. * [!846](https://gitlab.com/morley-framework/morley/-/merge_requests/846)
lorentz.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: lorentz-version: 0.12.0+version: 0.12.1 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/Base.hs view
@@ -50,6 +50,7 @@ rfMerge) import qualified Michelson.Typed as M (Contract(..)) import qualified Michelson.Untyped as U+import Michelson.Printer.Util (RenderDoc (..), buildRenderDocExtended) import Morley.Micheline (ToExpression(..)) -- | Alias for instruction which hides inner types representation via 'T'.@@ -57,6 +58,12 @@ { unLorentzInstr :: RemFail Instr (ToTs inp) (ToTs out) } deriving newtype (Show, Eq) infixr 1 :->++instance Buildable (inp :-> out) where+ build = buildRenderDocExtended++instance RenderDoc (inp :-> out) where+ renderDoc context = renderDoc context . iAnyCode instance NFData (i :-> o) where rnf (LorentzInstr i) = rnf i