- Bump
plutus-core
andplutus-ledger-api
to1.20.0.0
- Renamed
punionWith
andpunionWithData
ofPlutarch.Api.V1.AssocMap
topunionResolvingCollisionsWith
andpunionResolvingCollisionsWithData
, since they have been misused for what should have beenpzipWith
andpzipWithData
. - Renamed
punionWith
andpunionWithData
ofPlutarch.Api.V1.Value
topunionResolvingCollisionsWith
andpunionResolvingCollisionsWithData
, since they have been misused for what should have beenpzipWith
andpzipWithData
. - Introduced
pzipWith
,pzipWithData
,pzipWithDefault
,pzipWithDataDefault
,pzipWithDefaults
,pzipWithDataDefaults
,pintersectionWith
, andpintersectionWithData
inPlutarch.Api.V1.AssocMap
. Also introduced the typesBothPresentHandler
,BothPresentHandlerCommutative
,OnePresentHandler
,MergeHandler
andSomeMergeHandler
for instructingpzipWith
andpzipWithData
. - Added
Commutativity
inAssocMap
for instructing variousAssocMap
andValue
operations about the commutativity of the given value-merging function. - Renamed
pdifference
inAssocMap
topunsortedDifference
(O(n^2)). Introduced newpdifference
with stricter constraints and O(n). - Added
pleftBiasedUnion
inPlutarch.Api.V1.AssocMap
. - Added
pleftBiasedCurrencyUnion
andpleftBiasedTokenUnion
inPlutarch.Api.V1.Value
.
- Support newer Plutus
- Remove most of the Nix code and switch to mlabs-tooling.nix
- Exported data constructors instance for
Plutarch.Lift (LiftError)
-
Changed fields of
PTxInfo
whose only representation is data to not be wrapped byPAsData
.Module:
Plutarch.Api.V1.Contexts
;Plutarch.Api.V2.Contexts
-
Added
plistData
builtin function wrapper.Module:
Plutarch.Builtin
-
Added
PEq
superclass constraint toPOrd
Included by #326
-
Added module
Plutarch.Show
with thePShow
type class, as well as functionspshow
andptraceShowId
.Started by #352
-
Add
puncons
andptryUncons
functions for deconstructing list.Started by: #333
-
Add generic deriving for
PEq
Started by #335
-
Plutarch.Prelude
andPlutarch.List
now export pfind, pelemAt, preserve and pcheckSroted.Started by: #306
-
Added module
Plutarch.FFI
for interoperability with PlutusTx. -
Added
DerivePConstantViaBuiltin
, deprecatingDerivePConstantViaNewtype
. -
TermCont
: Parametrize by result type; addMonadFail
instance; etc.Also, export from
Plutarch.TermCont
, and then fromPlutarch.Prelude
(TermCont is no longer exported byPlutarch.Internal
).Started by: #226
-
Add
PlutusType
generic deriving support for data encoded Plutarch types, viaPIsDataRepr
andPIsDataReprInstances
.All existing ledger api types now have
PlutusType
instances - not justPMatch
.Started by: #250
-
Add
PDataRecord
construction utilities, necessary for full usage of data encodedPlutusType
instances.In particular, you can build
PDataRecord
s withpdcons
andpdnil
- refer to the guide for more info.pdcons
andpdnil
are also exported fromPlutarch.Prelude
.Also add
PlutusType
instance forPDataRecord
.Module:
Plutarch.DataRepr.Internal
Started by: #250
-
Export
PLabeledType ((:=))
fromPlutarch.Prelude
.Added by: #250
-
Add
pconstantData
- an efficient way of building data encoded constants directly.This is semantically equivalent to
pdata . pconstant
but does not do any extra builtin function call.Module:
Plutarch.Builtin
Added by: #251
-
Added APIs for constructing, compiling, serialising & hashing Plutarch scripts.
Type synonyms for Plutarch-typed scripts
PValidator
,PMintingPolicy
&PStakeValidator
.mkValidator
,mkStakeValidator
&mkMintingPolicy
functions, for creating Plutus API compatible scripts.validatorHash
,mintingPolicySymbol
&stakeValidatorHash
to obtain script hashes.Module:
Plutarch.V1.Api
See:
Plutarch.ScriptsSpec
inplutarch-test
for usage examples.Added by: #267
-
Add
PTuple
construction and related utilities.Module:
Plutarch.Api.V1.Tuple
Added by: #255
-
Add
PIsData
instances forPUnit
andPBuiltinPair (PAsData a) (PAsData b)
.It's helpful to mentally note that
PTuple a b
,PAsData (PTuple a b)
andPBuiltinPair (PAsData a) (PAsData b)
all have the exact same underlying representation. SeePlutarch.Api.V1.Tuple
for no-op conversion functions.Module:
Plutarch.Builtin
Added by: #255
-
Add implicit
pfromData
forhrecField
and the record dot. Add implicitpfromData
forpfield
.Module:
Plutarch.DataRepr
Added by: #235
-
Add
Plutarch.Test
for testing Plutarch code with goldens for UPLC printing and Plutus benchmarks. -
Add Conversion types
PTryFrom
,PMaybeFrom
andPFrom
Module:
Plutarch.TryFrom
Added by: #326
-
plutarch-extra
: Add a new directory scaffold "plutarch-extra
" which will be home to everything too specific to not be in the main Plutarch repo. Also refactored the test library.Directory:
plutarch-extra
Added by: #329
-
plutarch-extra
export merged PreludeModule:
Plutarch.PPrelude
Added by: #356
-
Add
PConstant
instance forMaybe
, with correspondingPLift
instance forPMaybeData
.Added by: #371
-
Add
POrd
andPEq
derivation for data encoded types viaPIsDataReprInstances
.Added by: #371
-
Make
PRational
construction machinery fail when the denominator is 0.Fixed by: #299
-
Rename
PConstant
(the typeclass) toPConstantDecl
.PConstant
is now a type alias with extra constraints for better type checking.Add
PLiftData
andPConstantData
type aliases.Added by: #354
-
Remove
hrecField
export. UsegetField
instead.Removed by: #415
-
Rename the
"data"
field ofPTxInfo
to"datums"
.Renamed by: #415
-
Add
Num
instance forPPOSIXTime
and export its constructor.Added by: #415
-
PlutusType
is now a superclass ofPIsDataRepr
, strengthening the existingPMatch
superclass constraint.Added by: #415
-
Add
PlutusType
instance forPDataSum
.PDataSum
can now be hand-constructed.Added by: #345
-
Add
HRecOf
,PMemberFields
, andPMemberField
utility types.Module:
Plutarch.DataRepr
.Added by: #466
-
Move
Plutarch.ListUtils
toPlutarch.Extra.List
.Added by: #466
-
Add various
TermCont
utilities:ptraceC
,pletFieldsC
,ptryFromC
,pguardC
, andpguardC'
.Module:
Plutarch.Extra.TermCont
.Added by: #466
-
General repository changes.
-
The Plutarch repo has moved to GHC 9.2.1. Projects using GHC 8.10.7 should still be able to depend on Plutarch. There is CI in place to ensure compatibility.
Relevant PR: #86
CI added by: #188
-
Major nix updates.
Started by: #75
-
Benchmarks and perf diffing on PRs to keep track of performance regressions.
Worked on through:
-
-
Significantly improve
plam
type inference - works seamlessly now (!!!)Worked on through:
Relevant issue: #2
-
Many, many optimizations on generated code.
Worked on through:
-
Add haddocks and examples to many functions
Started by: #49
-
Add many new utility functions, instances, and builtin function synonyms.
Breakdown of additions
-
Boolean utilities:-
pnot
,#&&
/pand
/pand'
,#||
/por
/por'
Module:
Plutarch.Bool
Added in: #30
-
ByteString utilities:-
pconsBS
,psliceBS
,plengthBS
,pindexBS
Module:
Plutarch.ByteString
Added in: #30
-
Cryptographic hashing utilities:-
psha2_256
,psha3_256
,pblake2b_256
,pverifySignature
Module:
Plutarch.Crypto
Added in: #30
-
PEq
,POrd
,Semigroup
, andMonoid
instances forPUnit
Module:
Plutarch.Unit
Added in: #30
-
UTF-8 encode/decode functions:-
pencodeUtf8
,pdecodeUtf8
Module:
Plutarch.String
Added in: #30
-
PIntegral
typeclassModule:
Plutarch.Integer
Added in: #30
-
PIntegral
instance forPInteger
Module:
Plutarch.Integer
Added in: #30
-
PEq
instance forPData
andPAsData
Module:
Plutarch.Builtin
Added in: #38
-
Tracing functions:-
ptrace
,ptraceIfFalse
,ptraceIfTrue
,ptraceError
Module:
Plutarch.Trace
Added in: #39
-
Builtin pair construction utility:-
ppairDataBuiltin
Module:
Plutarch.Builtin
Added in: #50
-
Loads of awesome list utilities thanks to #63!
Module:
Plutarch.List
-
PIsData
instance forPBool
Module:
Plutarch.Builtin
Added in: #110
-
-
Add
PIsData
for conversion between normal builtin types and theirData
representation.Initially added in: #31
-
Add
PAsData
for preserving more type information regardingData
encoded values.Initially added in: #31
-
Add
PDataRepr
and related machinery to ergonomically work withConstr
encoded data.There are also generic derivers (!!) to implement the related typeclasses for custom data types.
Module:
Plutarch.DataRepr
Worked on through
-
Add
PLift
andPConstant
- enabling conversion between Plutarch terms and Haskell types.This comes with convenient derivers. See the relevant section on the guide.
Module:
Plutarch.Lift
; another deriver withinPlutarch.DataRepr.Internal
Worked on through
-
Deprecate
punsafeConstant
. Usepconstant
instead! -
Add
PIsList
&PList
+ instances forPBuiltinList
- ergonomic list functions for all!Module:
Plutarch.List
; another instance inPlutarch.Builtin
Added in: #63
-
Mutually recursive data types, scott encoded records and more provided by
Plutarch.Rec
!Module:
Plutarch.Rec
Worked on through:
-
The Plutus V1 ledger api types implemented in Plutarch!
Module:
Plutarch.Api.V1
Worked on through:
-
Implement Plutarch rational type.
Module:
Plutarch.Rational
Added in: #89
-
The
s
inTerm s _
has a fixed kind now.data S
,s :: S
Module:
Plutarch.Internal
Added in: #115
-
Add
PType
, a synonym toS -> Type
- i.e the kind of Plutarch types. In particular, the kind of the 3rd type parameter ofTerm
.Module:
Plutarch.Internal
Added in: #115
-
Convenient do syntax with
QualifiedDo
(!!!)Module:
Plutarch.Monadic
Added in: #119
-
Add
DerivePNewtype
to derive common typeclasses for Plutarch newtypes.Module:
Plutarch
;Plutarch.Builtin
;Plutarch.Bool
;Plutarch.Integer
Added in: #151
-
A whole lot more exports from
Plutarch.Prelude
Module:
Plutarch.Prelude
Added in: #181
-
Move out
punsafe*
functions fromPlutarch
and intoPlutarch.Unsafe
. -
Add generic deriving for
PlutusType
with scott encoding representation.Added in: #189
Thanks to:
- @blamario
- @emiflake
- @Geometer1729
- @kozross
- @L-as
- @MatthewCroughan
- @sergesku
- @srid
- @t1lde
- @TotallyNotChase
Somewhat stable release