Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Added

- Added the Plinth parsed-AST deriving plugin (`PlinthPlugin`). It generates
`AsData` pattern synonyms, `Optics` prisms, and `Match` functions from data
declarations written with `deriving … via PlinthPlugin`. The sentinel lives
in `PlinthPlugin.Via` (`data Via = PlinthPlugin`).
20 changes: 20 additions & 0 deletions plutus-tx-plugin/plutus-tx-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,27 @@ library
hs-source-dirs: src
exposed-modules:
Plinth.Plugin
PlinthPlugin
PlinthPlugin.Via
PlutusTx.Compiler.Error
PlutusTx.Options
PlutusTx.Plugin.Common

other-modules:
Paths_plutus_tx_plugin
PlinthPlugin.Constant.Module
PlinthPlugin.Generator.AsData
PlinthPlugin.Generator.Common
PlinthPlugin.Generator.Match
PlinthPlugin.Generator.Optics
PlinthPlugin.Hs
PlinthPlugin.Hsc
PlinthPlugin.Options
PlinthPlugin.Type.Config
PlinthPlugin.Type.Constructor
PlinthPlugin.Type.Field
PlinthPlugin.Type.Flag
PlinthPlugin.Type.Type

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move these into PlutusTx.Plugin.Deriving.* or something like this

PlutusTx.Compiler.Binders
PlutusTx.Compiler.Builtins
PlutusTx.Compiler.Compat
Expand All @@ -77,6 +93,8 @@ library
PlutusTx.Plugin.Boilerplate
PlutusTx.Plugin.Unsupported

autogen-modules: Paths_plutus_tx_plugin

build-depends:
, array
, base >=4.9 && <5
Expand Down Expand Up @@ -242,6 +260,7 @@ test-suite frontend-plugin-tests
hs-source-dirs: test-frontend-plugin
main-is: Spec.hs
other-modules:
AsData.Spec
Inlineable.Lib
Inlineable.Spec
NoStrict.Spec
Expand All @@ -254,6 +273,7 @@ test-suite frontend-plugin-tests
, plutus-tx-plugin ^>=1.65
, plutus-tx:plutus-tx-testlib
, tasty
, tasty-hunit

ghc-options: -threaded -rtsopts -with-rtsopts=-N

Expand Down
Loading