From 3b28494a7af6f41098240e01fd5461f0683707e6 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Tue, 22 Jan 2019 14:46:28 +0000 Subject: [PATCH] Make the Plutus Tx plugin an internal library The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](https://github.com/haskell/cabal/issues/5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (https://github.com/haskell/cabal/issues/4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now. --- cabal.project | 2 - default.nix | 14 ++- lib.nix | 1 - nix/overlays/required.nix | 7 +- pkgs/default.nix | 81 ++---------- .../plutus-playground-lib.cabal | 3 +- plutus-tx-plugin/LICENSE | 11 -- plutus-tx-plugin/README.md | 13 -- plutus-tx-plugin/plutus-tx-plugin.cabal | 99 --------------- plutus-tx-plugin/shell.nix | 4 - plutus-tx-plugin/test/Spec.hs | 17 --- plutus-tx/.ghci | 3 - plutus-tx/README.md | 6 + .../compiler}/Language/PlutusTx/Builtins.hs | 0 .../Language/PlutusTx/Compiler/Binders.hs | 0 .../Language/PlutusTx/Compiler/Builtins.hs | 0 .../Language/PlutusTx/Compiler/Error.hs | 0 .../Language/PlutusTx/Compiler/Expr.hs | 0 .../Language/PlutusTx/Compiler/Expr.hs-boot | 0 .../Language/PlutusTx/Compiler/Kind.hs | 0 .../Language/PlutusTx/Compiler/Laziness.hs | 0 .../Language/PlutusTx/Compiler/Names.hs | 0 .../Language/PlutusTx/Compiler/Primitives.hs | 0 .../Language/PlutusTx/Compiler/Type.hs | 0 .../Language/PlutusTx/Compiler/Type.hs-boot | 0 .../Language/PlutusTx/Compiler/Types.hs | 0 .../Language/PlutusTx/Compiler/Utils.hs | 0 .../PlutusTx/Compiler/ValueRestriction.hs | 0 .../compiler}/Language/PlutusTx/Lift.hs | 0 .../compiler}/Language/PlutusTx/Lift/Class.hs | 0 .../Language/PlutusTx/Lift/Instances.hs | 0 .../Language/PlutusTx/Lift/THUtils.hs | 0 .../compiler}/Language/PlutusTx/PIRTypes.hs | 0 .../compiler}/Language/PlutusTx/PLCTypes.hs | 0 .../compiler}/Language/PlutusTx/Plugin.hs | 0 .../compiler}/Language/PlutusTx/Utils.hs | 0 plutus-tx/plutus-tx.cabal | 116 +++++++++++++----- .../test/Lift/Spec.hs | 0 .../test/Lift/boolInterop.plc.golden | 0 .../test/Lift/int.plc.golden | 0 .../test/Lift/liftPlc.plc.golden | 0 .../test/Lift/list.plc.golden | 0 .../test/Lift/listInterop.plc.golden | 0 .../test/Lift/mono.plc.golden | 0 .../test/Lift/monoInterop.plc.golden | 0 .../test/Lift/nested.plc.golden | 0 .../test/Lift/poly.plc.golden | 0 .../test/Lift/polyInterop.plc.golden | 0 .../test/Lift/record.plc.golden | 0 .../test/Lift/tuple.plc.golden | 0 .../test/Plugin/Spec.hs | 0 .../test/Plugin/basic/monoId.plc.golden | 0 .../test/Plugin/basic/monoK.plc.golden | 0 .../data/monomorphic/atPattern.plc.golden | 0 .../data/monomorphic/defaultCase.plc.golden | 0 .../Plugin/data/monomorphic/enum.plc.golden | 0 .../monomorphic/irrefutableMatch.plc.golden | 0 .../data/monomorphic/monoCase.plc.golden | 0 .../data/monomorphic/monoConstDest.plc.golden | 0 .../monoConstDestDefault.plc.golden | 0 .../monomorphic/monoConstructed.plc.golden | 0 .../monomorphic/monoConstructor.plc.golden | 0 .../data/monomorphic/monoDataType.plc.golden | 0 .../data/monomorphic/monoRecord.plc.golden | 0 .../data/monomorphic/nonValueCase.plc.golden | 0 .../data/monomorphic/recordNewtype.plc.golden | 0 .../monomorphic/recordSelector.plc.golden | 0 .../data/monomorphic/synonym.plc.golden | 0 .../data/newtypes/basicNewtype.plc.golden | 0 .../newtypes/nestedNewtypeMatch.plc.golden | 0 .../data/newtypes/newtypeCreatDest.plc.golden | 0 .../data/newtypes/newtypeCreate.plc.golden | 0 .../data/newtypes/newtypeCreate2.plc.golden | 0 .../Plugin/data/newtypes/newtypeId.plc.golden | 0 .../data/newtypes/newtypeMatch.plc.golden | 0 .../polymorphic/defaultCasePoly.plc.golden | 0 .../polymorphic/polyConstructed.plc.golden | 0 .../data/polymorphic/polyDataType.plc.golden | 0 .../Plugin/errors/emptyRoseId1.plc.golden | 0 .../test/Plugin/errors/free.plc.golden | 0 .../test/Plugin/errors/integer.plc.golden | 0 .../Plugin/errors/recordSelector.plc.golden | 0 .../Plugin/errors/valueRestriction.plc.golden | 0 .../test/Plugin/primitives/and.plc.golden | 0 .../Plugin/primitives/andApply.plc.golden | 0 .../test/Plugin/primitives/bool.plc.golden | 0 .../Plugin/primitives/bytestring.plc.golden | 0 .../primitives/bytestringApply.plc.golden | 0 .../primitives/equalsByteString.plc.golden | 0 .../test/Plugin/primitives/error.plc.golden | 0 .../Plugin/primitives/ifThenElse.plc.golden | 0 .../primitives/ifThenElseApply.plc.golden | 0 .../test/Plugin/primitives/int.plc.golden | 0 .../test/Plugin/primitives/int2.plc.golden | 0 .../Plugin/primitives/intCompare.plc.golden | 0 .../test/Plugin/primitives/intDiv.plc.golden | 0 .../test/Plugin/primitives/intEq.plc.golden | 0 .../Plugin/primitives/intEqApply.plc.golden | 0 .../test/Plugin/primitives/intPlus.plc.golden | 0 .../Plugin/primitives/intPlusApply.plc.golden | 0 .../Plugin/primitives/sha2_256.plc.golden | 0 .../test/Plugin/primitives/string.plc.golden | 0 .../test/Plugin/primitives/trace.plc.golden | 0 .../test/Plugin/primitives/tuple.plc.golden | 0 .../primitives/tupleConstDest.plc.golden | 0 .../Plugin/primitives/tupleMatch.plc.golden | 0 .../test/Plugin/primitives/verify.plc.golden | 0 .../test/Plugin/primitives/void.plc.golden | 0 .../Plugin/recursiveFunctions/even.plc.golden | 0 .../recursiveFunctions/even3.plc.golden | 0 .../recursiveFunctions/even4.plc.golden | 0 .../Plugin/recursiveFunctions/fib.plc.golden | 0 .../Plugin/recursiveFunctions/fib4.plc.golden | 0 .../Plugin/recursiveFunctions/sum.plc.golden | 0 .../recursiveFunctions/sumList.plc.golden | 0 .../recursiveTypes/listConstDest.plc.golden | 0 .../recursiveTypes/listConstDest2.plc.golden | 0 .../recursiveTypes/listConstruct.plc.golden | 0 .../recursiveTypes/listConstruct2.plc.golden | 0 .../recursiveTypes/listConstruct3.plc.golden | 0 .../recursiveTypes/listMatch.plc.golden | 0 .../recursiveTypes/polyRecEval.plc.golden | 0 .../recursiveTypes/ptreeConstDest.plc.golden | 0 .../recursiveTypes/ptreeConstruct.plc.golden | 0 .../recursiveTypes/ptreeFirstEval.plc.golden | 0 .../recursiveTypes/ptreeMatch.plc.golden | 0 .../recursiveTypes/sameEmptyRose.plc.golden | 0 .../sameEmptyRoseEval.plc.golden | 0 .../test/Plugin/structure/letFun.plc.golden | 0 plutus-tx/test/Spec.hs | 100 ++------------- plutus-tx/test/TH/Spec.hs | 100 +++++++++++++++ plutus-tx/test/{ => TH}/TestTH.hs | 2 +- plutus-tx/test/{ => TH}/all.plc.golden | 0 plutus-tx/test/{ => TH}/and.plc.golden | 0 .../test/{ => TH}/convertString.plc.golden | 0 plutus-tx/test/{ => TH}/power.plc.golden | 0 plutus-tx/test/{ => TH}/simple.plc.golden | 0 .../test/{ => TH}/traceDirect.plc.golden | 0 .../test/{ => TH}/tracePrelude.plc.golden | 0 .../test/{ => TH}/traceRepeatedly.plc.golden | 0 plutus-tx/tutorial/tutorial-doctests.hs | 2 - plutus-use-cases/plutus-use-cases.cabal | 2 - stack.yaml | 3 - wallet-api/wallet-api.cabal | 3 - 144 files changed, 226 insertions(+), 363 deletions(-) delete mode 100644 plutus-tx-plugin/LICENSE delete mode 100644 plutus-tx-plugin/README.md delete mode 100644 plutus-tx-plugin/plutus-tx-plugin.cabal delete mode 100644 plutus-tx-plugin/shell.nix delete mode 100644 plutus-tx-plugin/test/Spec.hs delete mode 100644 plutus-tx/.ghci rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Builtins.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Binders.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Builtins.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Error.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Expr.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Expr.hs-boot (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Kind.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Laziness.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Names.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Primitives.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Type.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Type.hs-boot (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Types.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/Utils.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Compiler/ValueRestriction.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Lift.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Lift/Class.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Lift/Instances.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Lift/THUtils.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/PIRTypes.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/PLCTypes.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Plugin.hs (100%) rename {plutus-tx-plugin/src => plutus-tx/compiler}/Language/PlutusTx/Utils.hs (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/Spec.hs (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/boolInterop.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/int.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/liftPlc.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/list.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/listInterop.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/mono.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/monoInterop.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/nested.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/poly.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/polyInterop.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/record.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Lift/tuple.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/Spec.hs (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/basic/monoId.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/basic/monoK.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/atPattern.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/defaultCase.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/enum.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/irrefutableMatch.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/monoCase.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/monoConstDest.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/monoConstDestDefault.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/monoConstructed.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/monoConstructor.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/monoDataType.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/monoRecord.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/nonValueCase.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/recordNewtype.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/recordSelector.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/monomorphic/synonym.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/newtypes/basicNewtype.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/newtypes/nestedNewtypeMatch.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/newtypes/newtypeCreatDest.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/newtypes/newtypeCreate.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/newtypes/newtypeCreate2.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/newtypes/newtypeId.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/newtypes/newtypeMatch.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/polymorphic/defaultCasePoly.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/polymorphic/polyConstructed.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/data/polymorphic/polyDataType.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/errors/emptyRoseId1.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/errors/free.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/errors/integer.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/errors/recordSelector.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/errors/valueRestriction.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/and.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/andApply.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/bool.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/bytestring.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/bytestringApply.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/equalsByteString.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/error.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/ifThenElse.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/ifThenElseApply.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/int.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/int2.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/intCompare.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/intDiv.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/intEq.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/intEqApply.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/intPlus.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/intPlusApply.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/sha2_256.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/string.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/trace.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/tuple.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/tupleConstDest.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/tupleMatch.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/verify.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/primitives/void.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveFunctions/even.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveFunctions/even3.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveFunctions/even4.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveFunctions/fib.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveFunctions/fib4.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveFunctions/sum.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveFunctions/sumList.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/listConstDest.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/listConstDest2.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/listConstruct.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/listConstruct2.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/listConstruct3.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/listMatch.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/polyRecEval.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/ptreeConstDest.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/ptreeConstruct.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/ptreeFirstEval.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/ptreeMatch.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/sameEmptyRose.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/recursiveTypes/sameEmptyRoseEval.plc.golden (100%) rename {plutus-tx-plugin => plutus-tx}/test/Plugin/structure/letFun.plc.golden (100%) create mode 100644 plutus-tx/test/TH/Spec.hs rename plutus-tx/test/{ => TH}/TestTH.hs (96%) rename plutus-tx/test/{ => TH}/all.plc.golden (100%) rename plutus-tx/test/{ => TH}/and.plc.golden (100%) rename plutus-tx/test/{ => TH}/convertString.plc.golden (100%) rename plutus-tx/test/{ => TH}/power.plc.golden (100%) rename plutus-tx/test/{ => TH}/simple.plc.golden (100%) rename plutus-tx/test/{ => TH}/traceDirect.plc.golden (100%) rename plutus-tx/test/{ => TH}/tracePrelude.plc.golden (100%) rename plutus-tx/test/{ => TH}/traceRepeatedly.plc.golden (100%) delete mode 100644 plutus-tx/tutorial/tutorial-doctests.hs diff --git a/cabal.project b/cabal.project index 172ad397028..766cdb228ea 100644 --- a/cabal.project +++ b/cabal.project @@ -3,7 +3,6 @@ packages: language-plutus-core plutus-exe wallet-api plutus-tx - plutus-tx-plugin plutus-use-cases plutus-ir plutus-playground/plutus-playground-server @@ -11,7 +10,6 @@ packages: language-plutus-core optimization: 2 constraints: language-plutus-core +development , wallet-api +development - , plutus-tx-plugin +development , plutus-exe +development , plutus-core-interpreter +development , plutus-ir +development diff --git a/default.nix b/default.nix index 7cd709bbb5f..c7bc40b87c2 100644 --- a/default.nix +++ b/default.nix @@ -78,6 +78,10 @@ let filter = localLib.isPlutus; }; customOverlays = optional forceError errorOverlay; + # Filter down to local packages, except those named in the given list + localButNot = nope: + let okay = builtins.filter (name: !(builtins.elem name nope)) localLib.plutusPkgList; + in name: builtins.elem name okay; # We can pass an evaluated version of our packages into # iohk-nix, and then we can also get out the compiler # so we make sure it uses the same one. @@ -91,17 +95,17 @@ let filter = localLib.isPlutus; filterOverrides = { - splitCheck = let - dontSplit = [ + splitCheck = localButNot [ # Broken for things with test tool dependencies "wallet-api" "plutus-tx" # Broken for things which pick up other files at test runtime "plutus-playground-server" ]; - # Split only local packages not in the don't split list - doSplit = builtins.filter (name: !(builtins.elem name dontSplit)) localLib.plutusPkgList; - in name: builtins.elem name doSplit; + haddock = localButNot [ + # Haddock is broken for things with internal libraries + "plutus-tx" + ]; }; requiredOverlay = ./nix/overlays/required.nix; }; diff --git a/lib.nix b/lib.nix index 08631d36b51..b75f322fe2f 100644 --- a/lib.nix +++ b/lib.nix @@ -32,7 +32,6 @@ let "plutus-exe" "plutus-ir" "plutus-tx" - "plutus-tx-plugin" "plutus-use-cases" "wallet-api" ]; diff --git a/nix/overlays/required.nix b/nix/overlays/required.nix index d351c0ba76d..b86c80fa0b4 100644 --- a/nix/overlays/required.nix +++ b/nix/overlays/required.nix @@ -7,15 +7,20 @@ let addRealTimeTestLogs = drv: overrideCabal drv (attrs: { testTarget = "--show-details=streaming"; }); + doctest = opts: drv: overrideCabal drv (attrs: { + postCheck = "./Setup doctest --doctest-options=\"${opts}\""; + }); in self: super: { ######################################################################## # Overides of local packages + language-plutus-core = addRealTimeTestLogs super.language-plutus-core; + # cabal doctest doesn't seem to be clever enough to pick these up from the cabal file + plutus-tx = doctest "-pgmL markdown-unlit -XTemplateHaskell -XDeriveFunctor -XScopedTypeVariables" super.plutus-tx; ######################################################################## - language-plutus-core = addRealTimeTestLogs super.language-plutus-core; # The base Haskell package builder mkDerivation = args: super.mkDerivation (args // diff --git a/pkgs/default.nix b/pkgs/default.nix index 6c12334d794..c887e81c92b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -55713,7 +55713,6 @@ license = stdenv.lib.licenses.bsd3; , network , newtype-generics , plutus-tx -, plutus-tx-plugin , plutus-use-cases , servant , split @@ -55746,7 +55745,6 @@ mtl network newtype-generics plutus-tx -plutus-tx-plugin plutus-use-cases servant split @@ -55953,61 +55951,14 @@ license = stdenv.lib.licenses.bsd3; mkDerivation , base , bytestring -, doctest -, language-plutus-core -, markdown-unlit -, mtl -, plutus-core-interpreter -, plutus-ir -, plutus-tx-plugin -, prettyprinter -, stdenv -, tasty -, template-haskell -}: -mkDerivation { - -pname = "plutus-tx"; -version = "0.1.0.0"; -src = .././plutus-tx; -libraryHaskellDepends = [ -base -bytestring -language-plutus-core -plutus-core-interpreter -plutus-tx-plugin -template-haskell -]; -testHaskellDepends = [ -base -doctest -language-plutus-core -mtl -plutus-ir -plutus-tx-plugin -prettyprinter -tasty -template-haskell -]; -testToolDepends = [ -markdown-unlit -]; -doHaddock = false; -description = "The PlutusTx compiler frontend"; -license = stdenv.lib.licenses.bsd3; - -}) {}; -"plutus-tx-plugin" = callPackage -({ - mkDerivation -, base -, bytestring -, cborg , containers +, doctest , ghc , language-plutus-core , lens +, markdown-unlit , mtl +, plutus-core-interpreter , plutus-ir , prettyprinter , serialise @@ -56020,18 +55971,18 @@ license = stdenv.lib.licenses.bsd3; }: mkDerivation { -pname = "plutus-tx-plugin"; +pname = "plutus-tx"; version = "0.1.0.0"; -src = .././plutus-tx-plugin; +src = .././plutus-tx; libraryHaskellDepends = [ base bytestring -cborg containers ghc language-plutus-core lens mtl +plutus-core-interpreter plutus-ir prettyprinter serialise @@ -56040,16 +55991,22 @@ text th-abstraction transformers ]; +libraryToolDepends = [ +doctest +markdown-unlit +]; testHaskellDepends = [ base bytestring language-plutus-core +mtl plutus-ir prettyprinter tasty +template-haskell ]; doHaddock = false; -description = "PlutusTx compiler plugin"; +description = "The PlutusTx compiler frontend"; license = stdenv.lib.licenses.bsd3; }) {}; @@ -56063,7 +56020,6 @@ license = stdenv.lib.licenses.bsd3; , lens , mtl , plutus-tx -, plutus-tx-plugin , stdenv , tasty , tasty-hedgehog @@ -56083,7 +56039,6 @@ containers lens mtl plutus-tx -plutus-tx-plugin template-haskell wallet-api ]; @@ -56092,7 +56047,6 @@ base containers hedgehog plutus-tx -plutus-tx-plugin tasty tasty-hedgehog template-haskell @@ -78015,20 +77969,17 @@ license = stdenv.lib.licenses.mit; , containers , cryptonite , deriving-compat -, doctest , hashable , hedgehog , http-media , language-plutus-core , lens -, markdown-unlit , memory , mtl , natural-transformation , newtype-generics , operational , plutus-tx -, plutus-tx-plugin , recursion-schemes , serialise , servant @@ -78071,7 +78022,6 @@ natural-transformation newtype-generics operational plutus-tx -plutus-tx-plugin recursion-schemes serialise servant @@ -78090,18 +78040,13 @@ warp testHaskellDepends = [ base containers -doctest hedgehog lens plutus-tx -plutus-tx-plugin tasty tasty-hedgehog transformers ]; -testToolDepends = [ -markdown-unlit -]; doHaddock = false; description = "Wallet API"; license = stdenv.lib.licenses.bsd3; diff --git a/plutus-playground/plutus-playground-lib/plutus-playground-lib.cabal b/plutus-playground/plutus-playground-lib/plutus-playground-lib.cabal index 2f41f376690..d5b46ba455e 100644 --- a/plutus-playground/plutus-playground-lib/plutus-playground-lib.cabal +++ b/plutus-playground/plutus-playground-lib/plutus-playground-lib.cabal @@ -40,7 +40,6 @@ library , bytestring , containers , plutus-tx -any - , plutus-tx-plugin -any , hint >= 0.9.0 , http-media , insert-ordered-containers @@ -79,4 +78,4 @@ test-suite playground-lib-test ghc-options: -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities \ No newline at end of file + -Wredundant-constraints -Widentities diff --git a/plutus-tx-plugin/LICENSE b/plutus-tx-plugin/LICENSE deleted file mode 100644 index a94365be350..00000000000 --- a/plutus-tx-plugin/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright Input Output (c) 2018 - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/plutus-tx-plugin/README.md b/plutus-tx-plugin/README.md deleted file mode 100644 index 6e51d9d5459..00000000000 --- a/plutus-tx-plugin/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# GHC Core to Plutus Core converter and plugin - -This package is a library which allows converting GHC Core into Plutus Core, with the aim of allowing people to write Plutus contracts in surface Haskell. - -The package also contains a compiler plugin which looks for specially tagged expressions and applies the converter. This should not usually be used directly, -but rather via [plutus-tx](../plutus-tx/README.md). - -## Debugging - -The plugin can produce somewhat intimidating errors. In particular it can be hard to work out which expression -is responsible for an error. To improve this you can compile the file in question with the `-g` GHC option. This -will result in additional source spans being put into the program which will appear in errors. - diff --git a/plutus-tx-plugin/plutus-tx-plugin.cabal b/plutus-tx-plugin/plutus-tx-plugin.cabal deleted file mode 100644 index 8b5eb77f41c..00000000000 --- a/plutus-tx-plugin/plutus-tx-plugin.cabal +++ /dev/null @@ -1,99 +0,0 @@ -cabal-version: 1.18 -name: plutus-tx-plugin -version: 0.1.0.0 -license: BSD3 -license-file: LICENSE -copyright: Copyright: (c) 2018 Input Output -maintainer: michael.peyton-jones@iohk.io -author: Michael Peyton Jones -synopsis: PlutusTx compiler plugin -description: - GHC compiler plugin for the PlutusTx compiler -category: Language -build-type: Simple -extra-doc-files: README.md - -source-repository head - type: git - location: https://github.com/input-output-hk/plutus - -flag development - description: - Enable `-Werror` - default: False - manual: True - -library - exposed-modules: - Language.PlutusTx.Lift - Language.PlutusTx.Lift.Class - Language.PlutusTx.Plugin - Language.PlutusTx.Builtins - Language.PlutusTx.Compiler.Error - hs-source-dirs: src - other-modules: - Language.PlutusTx.PLCTypes - Language.PlutusTx.PIRTypes - Language.PlutusTx.Utils - Language.PlutusTx.Lift.THUtils - Language.PlutusTx.Lift.Instances - Language.PlutusTx.Compiler.Binders - Language.PlutusTx.Compiler.Builtins - Language.PlutusTx.Compiler.Laziness - Language.PlutusTx.Compiler.Expr - Language.PlutusTx.Compiler.Names - Language.PlutusTx.Compiler.Kind - Language.PlutusTx.Compiler.Primitives - Language.PlutusTx.Compiler.Type - Language.PlutusTx.Compiler.Types - Language.PlutusTx.Compiler.Utils - Language.PlutusTx.Compiler.ValueRestriction - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable - other-extensions: DeriveAnyClass FlexibleContexts FlexibleInstances - MultiParamTypeClasses TypeFamilies OverloadedStrings - MonadComprehensions ConstrainedClassMethods TupleSections GADTs - RankNTypes TemplateHaskell QuasiQuotes TypeApplications - ExistentialQuantification - ghc-options: -Wall -Wnoncanonical-monad-instances - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities - build-depends: - base >=4.9 && <5, - bytestring -any, - cborg -any, - containers -any, - ghc -any, - language-plutus-core -any, - lens -any, - mtl -any, - plutus-ir -any, - prettyprinter -any, - serialise -any, - template-haskell -any, - th-abstraction -any, - text -any, - transformers -any - - if (flag(development) && impl(ghc <8.4)) - ghc-options: -Werror - -test-suite plutus-tx-plugin-tests - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - Lift.Spec - Plugin.Spec - default-language: Haskell2010 - build-depends: - base >=4.9 && <5, - plutus-tx-plugin -any, - plutus-ir -any, - prettyprinter -any, - language-plutus-core -any, - bytestring -any, - tasty -any diff --git a/plutus-tx-plugin/shell.nix b/plutus-tx-plugin/shell.nix deleted file mode 100644 index 2c3ec041a84..00000000000 --- a/plutus-tx-plugin/shell.nix +++ /dev/null @@ -1,4 +0,0 @@ -let - local = import ../. {}; -in -local.localLib.withDevTools local.localPackages.plutus-tx-plugin.env diff --git a/plutus-tx-plugin/test/Spec.hs b/plutus-tx-plugin/test/Spec.hs deleted file mode 100644 index 349d7cc0547..00000000000 --- a/plutus-tx-plugin/test/Spec.hs +++ /dev/null @@ -1,17 +0,0 @@ -module Main (main) where - -import qualified Lift.Spec as Lift -import qualified Plugin.Spec as Plugin - -import Common - -import Test.Tasty - -main :: IO () -main = defaultMain $ runTestNestedIn ["test"] tests - -tests :: TestNested -tests = testGroup "tests" <$> sequence [ - Plugin.tests - , Lift.tests - ] diff --git a/plutus-tx/.ghci b/plutus-tx/.ghci deleted file mode 100644 index 26ac97840dc..00000000000 --- a/plutus-tx/.ghci +++ /dev/null @@ -1,3 +0,0 @@ -:set -XFlexibleContexts -:m +PlutusPrelude Data.Text.Prettyprint.Doc -:set -interactive-print printPretty diff --git a/plutus-tx/README.md b/plutus-tx/README.md index 7248294555e..e2b09a02f33 100644 --- a/plutus-tx/README.md +++ b/plutus-tx/README.md @@ -34,3 +34,9 @@ Not supported, and support not planned: ## Tutorial See [here](tutorial/Tutorial.md) for a tutorial. + +## Debugging + +The compiler plugin can produce somewhat intimidating errors. In particular it can be hard to work out which expression +is responsible for an error. To improve this you can compile the file in question with the `-g` GHC option. This +will result in additional source spans being put into the program which will appear in errors. diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Builtins.hs b/plutus-tx/compiler/Language/PlutusTx/Builtins.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Builtins.hs rename to plutus-tx/compiler/Language/PlutusTx/Builtins.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Binders.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Binders.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Binders.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Binders.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Builtins.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Builtins.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Builtins.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Builtins.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Error.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Error.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Error.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Error.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Expr.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Expr.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Expr.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Expr.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Expr.hs-boot b/plutus-tx/compiler/Language/PlutusTx/Compiler/Expr.hs-boot similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Expr.hs-boot rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Expr.hs-boot diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Kind.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Kind.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Kind.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Kind.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Laziness.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Laziness.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Laziness.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Laziness.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Names.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Names.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Names.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Names.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Primitives.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Primitives.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Primitives.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Primitives.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Type.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Type.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Type.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Type.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Type.hs-boot b/plutus-tx/compiler/Language/PlutusTx/Compiler/Type.hs-boot similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Type.hs-boot rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Type.hs-boot diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Types.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Types.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Types.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Types.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/Utils.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/Utils.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/Utils.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/Utils.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Compiler/ValueRestriction.hs b/plutus-tx/compiler/Language/PlutusTx/Compiler/ValueRestriction.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Compiler/ValueRestriction.hs rename to plutus-tx/compiler/Language/PlutusTx/Compiler/ValueRestriction.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Lift.hs b/plutus-tx/compiler/Language/PlutusTx/Lift.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Lift.hs rename to plutus-tx/compiler/Language/PlutusTx/Lift.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Lift/Class.hs b/plutus-tx/compiler/Language/PlutusTx/Lift/Class.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Lift/Class.hs rename to plutus-tx/compiler/Language/PlutusTx/Lift/Class.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Lift/Instances.hs b/plutus-tx/compiler/Language/PlutusTx/Lift/Instances.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Lift/Instances.hs rename to plutus-tx/compiler/Language/PlutusTx/Lift/Instances.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Lift/THUtils.hs b/plutus-tx/compiler/Language/PlutusTx/Lift/THUtils.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Lift/THUtils.hs rename to plutus-tx/compiler/Language/PlutusTx/Lift/THUtils.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/PIRTypes.hs b/plutus-tx/compiler/Language/PlutusTx/PIRTypes.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/PIRTypes.hs rename to plutus-tx/compiler/Language/PlutusTx/PIRTypes.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/PLCTypes.hs b/plutus-tx/compiler/Language/PlutusTx/PLCTypes.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/PLCTypes.hs rename to plutus-tx/compiler/Language/PlutusTx/PLCTypes.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Plugin.hs b/plutus-tx/compiler/Language/PlutusTx/Plugin.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Plugin.hs rename to plutus-tx/compiler/Language/PlutusTx/Plugin.hs diff --git a/plutus-tx-plugin/src/Language/PlutusTx/Utils.hs b/plutus-tx/compiler/Language/PlutusTx/Utils.hs similarity index 100% rename from plutus-tx-plugin/src/Language/PlutusTx/Utils.hs rename to plutus-tx/compiler/Language/PlutusTx/Utils.hs diff --git a/plutus-tx/plutus-tx.cabal b/plutus-tx/plutus-tx.cabal index 73d4b2309e0..fdcf5fa8592 100644 --- a/plutus-tx/plutus-tx.cabal +++ b/plutus-tx/plutus-tx.cabal @@ -1,7 +1,7 @@ -cabal-version: 1.18 +cabal-version: 2.2 name: plutus-tx version: 0.1.0.0 -license: BSD3 +license: BSD-3-Clause license-file: LICENSE copyright: Copyright: (c) 2018 Input Output maintainer: michael.peyton-jones@iohk.io @@ -17,16 +17,7 @@ source-repository head type: git location: https://github.com/input-output-hk/plutus -library - exposed-modules: - Language.PlutusTx - Language.PlutusTx.TH - Language.PlutusTx.Prelude - Language.PlutusTx.Evaluation - other-modules: - Language.PlutusTx.Prelude.Stage0 - Language.PlutusTx.Prelude.Stage1 - hs-source-dirs: src +common lang default-language: Haskell2010 default-extensions: ExplicitForAll ScopedTypeVariables DeriveGeneric StandaloneDeriving DeriveLift @@ -40,45 +31,104 @@ library ghc-options: -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints -Widentities + +library + import: lang + hs-source-dirs: src + exposed-modules: + Language.PlutusTx + Language.PlutusTx.TH + Language.PlutusTx.Prelude + Language.PlutusTx.Evaluation + reexported-modules: + Language.PlutusTx.Lift, + Language.PlutusTx.Lift.Class, + Language.PlutusTx.Builtins, + Language.PlutusTx.Plugin + other-modules: + Language.PlutusTx.Prelude.Stage0 + Language.PlutusTx.Prelude.Stage1 + build-tool-depends: doctest:doctest build-depends: base >=4.9 && <5, bytestring -any, template-haskell >=2.13.0.0, language-plutus-core -any, plutus-core-interpreter -any, - plutus-tx-plugin -any + plutus-tx-compiler -any -test-suite plutus-tx-tests - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - TestTH - default-language: Haskell2010 +library plutus-tx-compiler + import: lang + hs-source-dirs: compiler + exposed-modules: + Language.PlutusTx.Plugin + Language.PlutusTx.Builtins + Language.PlutusTx.PLCTypes + Language.PlutusTx.PIRTypes + Language.PlutusTx.Utils + Language.PlutusTx.Lift + Language.PlutusTx.Lift.Class + Language.PlutusTx.Lift.THUtils + Language.PlutusTx.Lift.Instances + Language.PlutusTx.Compiler.Error + Language.PlutusTx.Compiler.Binders + Language.PlutusTx.Compiler.Builtins + Language.PlutusTx.Compiler.Laziness + Language.PlutusTx.Compiler.Expr + Language.PlutusTx.Compiler.Names + Language.PlutusTx.Compiler.Kind + Language.PlutusTx.Compiler.Primitives + Language.PlutusTx.Compiler.Type + Language.PlutusTx.Compiler.Types + Language.PlutusTx.Compiler.Utils + Language.PlutusTx.Compiler.ValueRestriction build-depends: base >=4.9 && <5, + bytestring -any, + containers -any, + ghc -any, language-plutus-core -any, - plutus-tx-plugin -any, - plutus-tx -any, + lens -any, + mtl -any, plutus-ir -any, prettyprinter -any, - mtl -any, + serialise -any, template-haskell -any, - tasty -any + th-abstraction -any, + text -any, + transformers -any -test-suite plutus-tx-tutorial-doctests - type: exitcode-stdio-1.0 - main-is: tutorial-doctests.hs - build-tool-depends: markdown-unlit:markdown-unlit -any +library plutus-tx-tutorial + import: lang hs-source-dirs: tutorial - other-modules: + exposed-modules: Tutorial + ghc-options: -pgmL markdown-unlit -Wno-unused-imports + build-tool-depends: markdown-unlit:markdown-unlit -any + build-depends: + base >=4.9 && <5, + bytestring -any, + template-haskell >=2.13.0.0, + language-plutus-core -any, + plutus-tx -any + +test-suite plutus-tx-tests + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: Spec.hs + other-modules: + Lift.Spec + Plugin.Spec + TH.Spec + TH.TestTH default-language: Haskell2010 - ghc-options: -pgmL markdown-unlit -threaded build-depends: base >=4.9 && <5, - plutus-tx -any, - plutus-tx-plugin -any, language-plutus-core -any, + plutus-tx -any, + plutus-ir -any, prettyprinter -any, - doctest -any + mtl -any, + bytestring -any, + template-haskell -any, + tasty -any diff --git a/plutus-tx-plugin/test/Lift/Spec.hs b/plutus-tx/test/Lift/Spec.hs similarity index 100% rename from plutus-tx-plugin/test/Lift/Spec.hs rename to plutus-tx/test/Lift/Spec.hs diff --git a/plutus-tx-plugin/test/Lift/boolInterop.plc.golden b/plutus-tx/test/Lift/boolInterop.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/boolInterop.plc.golden rename to plutus-tx/test/Lift/boolInterop.plc.golden diff --git a/plutus-tx-plugin/test/Lift/int.plc.golden b/plutus-tx/test/Lift/int.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/int.plc.golden rename to plutus-tx/test/Lift/int.plc.golden diff --git a/plutus-tx-plugin/test/Lift/liftPlc.plc.golden b/plutus-tx/test/Lift/liftPlc.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/liftPlc.plc.golden rename to plutus-tx/test/Lift/liftPlc.plc.golden diff --git a/plutus-tx-plugin/test/Lift/list.plc.golden b/plutus-tx/test/Lift/list.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/list.plc.golden rename to plutus-tx/test/Lift/list.plc.golden diff --git a/plutus-tx-plugin/test/Lift/listInterop.plc.golden b/plutus-tx/test/Lift/listInterop.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/listInterop.plc.golden rename to plutus-tx/test/Lift/listInterop.plc.golden diff --git a/plutus-tx-plugin/test/Lift/mono.plc.golden b/plutus-tx/test/Lift/mono.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/mono.plc.golden rename to plutus-tx/test/Lift/mono.plc.golden diff --git a/plutus-tx-plugin/test/Lift/monoInterop.plc.golden b/plutus-tx/test/Lift/monoInterop.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/monoInterop.plc.golden rename to plutus-tx/test/Lift/monoInterop.plc.golden diff --git a/plutus-tx-plugin/test/Lift/nested.plc.golden b/plutus-tx/test/Lift/nested.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/nested.plc.golden rename to plutus-tx/test/Lift/nested.plc.golden diff --git a/plutus-tx-plugin/test/Lift/poly.plc.golden b/plutus-tx/test/Lift/poly.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/poly.plc.golden rename to plutus-tx/test/Lift/poly.plc.golden diff --git a/plutus-tx-plugin/test/Lift/polyInterop.plc.golden b/plutus-tx/test/Lift/polyInterop.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/polyInterop.plc.golden rename to plutus-tx/test/Lift/polyInterop.plc.golden diff --git a/plutus-tx-plugin/test/Lift/record.plc.golden b/plutus-tx/test/Lift/record.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/record.plc.golden rename to plutus-tx/test/Lift/record.plc.golden diff --git a/plutus-tx-plugin/test/Lift/tuple.plc.golden b/plutus-tx/test/Lift/tuple.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Lift/tuple.plc.golden rename to plutus-tx/test/Lift/tuple.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/Spec.hs b/plutus-tx/test/Plugin/Spec.hs similarity index 100% rename from plutus-tx-plugin/test/Plugin/Spec.hs rename to plutus-tx/test/Plugin/Spec.hs diff --git a/plutus-tx-plugin/test/Plugin/basic/monoId.plc.golden b/plutus-tx/test/Plugin/basic/monoId.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/basic/monoId.plc.golden rename to plutus-tx/test/Plugin/basic/monoId.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/basic/monoK.plc.golden b/plutus-tx/test/Plugin/basic/monoK.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/basic/monoK.plc.golden rename to plutus-tx/test/Plugin/basic/monoK.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/atPattern.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/atPattern.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/atPattern.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/atPattern.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/defaultCase.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/defaultCase.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/defaultCase.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/defaultCase.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/enum.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/enum.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/enum.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/enum.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/irrefutableMatch.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/irrefutableMatch.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/irrefutableMatch.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/irrefutableMatch.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/monoCase.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/monoCase.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/monoCase.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/monoCase.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/monoConstDest.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/monoConstDest.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/monoConstDest.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/monoConstDest.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/monoConstDestDefault.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/monoConstDestDefault.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/monoConstDestDefault.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/monoConstDestDefault.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/monoConstructed.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/monoConstructed.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/monoConstructed.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/monoConstructed.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/monoConstructor.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/monoConstructor.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/monoConstructor.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/monoConstructor.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/monoDataType.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/monoDataType.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/monoDataType.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/monoDataType.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/monoRecord.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/monoRecord.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/monoRecord.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/monoRecord.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/nonValueCase.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/nonValueCase.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/nonValueCase.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/nonValueCase.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/recordNewtype.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/recordNewtype.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/recordNewtype.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/recordNewtype.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/recordSelector.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/recordSelector.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/recordSelector.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/recordSelector.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/monomorphic/synonym.plc.golden b/plutus-tx/test/Plugin/data/monomorphic/synonym.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/monomorphic/synonym.plc.golden rename to plutus-tx/test/Plugin/data/monomorphic/synonym.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/newtypes/basicNewtype.plc.golden b/plutus-tx/test/Plugin/data/newtypes/basicNewtype.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/newtypes/basicNewtype.plc.golden rename to plutus-tx/test/Plugin/data/newtypes/basicNewtype.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/newtypes/nestedNewtypeMatch.plc.golden b/plutus-tx/test/Plugin/data/newtypes/nestedNewtypeMatch.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/newtypes/nestedNewtypeMatch.plc.golden rename to plutus-tx/test/Plugin/data/newtypes/nestedNewtypeMatch.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/newtypes/newtypeCreatDest.plc.golden b/plutus-tx/test/Plugin/data/newtypes/newtypeCreatDest.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/newtypes/newtypeCreatDest.plc.golden rename to plutus-tx/test/Plugin/data/newtypes/newtypeCreatDest.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/newtypes/newtypeCreate.plc.golden b/plutus-tx/test/Plugin/data/newtypes/newtypeCreate.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/newtypes/newtypeCreate.plc.golden rename to plutus-tx/test/Plugin/data/newtypes/newtypeCreate.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/newtypes/newtypeCreate2.plc.golden b/plutus-tx/test/Plugin/data/newtypes/newtypeCreate2.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/newtypes/newtypeCreate2.plc.golden rename to plutus-tx/test/Plugin/data/newtypes/newtypeCreate2.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/newtypes/newtypeId.plc.golden b/plutus-tx/test/Plugin/data/newtypes/newtypeId.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/newtypes/newtypeId.plc.golden rename to plutus-tx/test/Plugin/data/newtypes/newtypeId.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/newtypes/newtypeMatch.plc.golden b/plutus-tx/test/Plugin/data/newtypes/newtypeMatch.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/newtypes/newtypeMatch.plc.golden rename to plutus-tx/test/Plugin/data/newtypes/newtypeMatch.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/polymorphic/defaultCasePoly.plc.golden b/plutus-tx/test/Plugin/data/polymorphic/defaultCasePoly.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/polymorphic/defaultCasePoly.plc.golden rename to plutus-tx/test/Plugin/data/polymorphic/defaultCasePoly.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/polymorphic/polyConstructed.plc.golden b/plutus-tx/test/Plugin/data/polymorphic/polyConstructed.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/polymorphic/polyConstructed.plc.golden rename to plutus-tx/test/Plugin/data/polymorphic/polyConstructed.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/data/polymorphic/polyDataType.plc.golden b/plutus-tx/test/Plugin/data/polymorphic/polyDataType.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/data/polymorphic/polyDataType.plc.golden rename to plutus-tx/test/Plugin/data/polymorphic/polyDataType.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/errors/emptyRoseId1.plc.golden b/plutus-tx/test/Plugin/errors/emptyRoseId1.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/errors/emptyRoseId1.plc.golden rename to plutus-tx/test/Plugin/errors/emptyRoseId1.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/errors/free.plc.golden b/plutus-tx/test/Plugin/errors/free.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/errors/free.plc.golden rename to plutus-tx/test/Plugin/errors/free.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/errors/integer.plc.golden b/plutus-tx/test/Plugin/errors/integer.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/errors/integer.plc.golden rename to plutus-tx/test/Plugin/errors/integer.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/errors/recordSelector.plc.golden b/plutus-tx/test/Plugin/errors/recordSelector.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/errors/recordSelector.plc.golden rename to plutus-tx/test/Plugin/errors/recordSelector.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/errors/valueRestriction.plc.golden b/plutus-tx/test/Plugin/errors/valueRestriction.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/errors/valueRestriction.plc.golden rename to plutus-tx/test/Plugin/errors/valueRestriction.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/and.plc.golden b/plutus-tx/test/Plugin/primitives/and.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/and.plc.golden rename to plutus-tx/test/Plugin/primitives/and.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/andApply.plc.golden b/plutus-tx/test/Plugin/primitives/andApply.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/andApply.plc.golden rename to plutus-tx/test/Plugin/primitives/andApply.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/bool.plc.golden b/plutus-tx/test/Plugin/primitives/bool.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/bool.plc.golden rename to plutus-tx/test/Plugin/primitives/bool.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/bytestring.plc.golden b/plutus-tx/test/Plugin/primitives/bytestring.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/bytestring.plc.golden rename to plutus-tx/test/Plugin/primitives/bytestring.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/bytestringApply.plc.golden b/plutus-tx/test/Plugin/primitives/bytestringApply.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/bytestringApply.plc.golden rename to plutus-tx/test/Plugin/primitives/bytestringApply.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/equalsByteString.plc.golden b/plutus-tx/test/Plugin/primitives/equalsByteString.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/equalsByteString.plc.golden rename to plutus-tx/test/Plugin/primitives/equalsByteString.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/error.plc.golden b/plutus-tx/test/Plugin/primitives/error.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/error.plc.golden rename to plutus-tx/test/Plugin/primitives/error.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/ifThenElse.plc.golden b/plutus-tx/test/Plugin/primitives/ifThenElse.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/ifThenElse.plc.golden rename to plutus-tx/test/Plugin/primitives/ifThenElse.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/ifThenElseApply.plc.golden b/plutus-tx/test/Plugin/primitives/ifThenElseApply.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/ifThenElseApply.plc.golden rename to plutus-tx/test/Plugin/primitives/ifThenElseApply.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/int.plc.golden b/plutus-tx/test/Plugin/primitives/int.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/int.plc.golden rename to plutus-tx/test/Plugin/primitives/int.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/int2.plc.golden b/plutus-tx/test/Plugin/primitives/int2.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/int2.plc.golden rename to plutus-tx/test/Plugin/primitives/int2.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/intCompare.plc.golden b/plutus-tx/test/Plugin/primitives/intCompare.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/intCompare.plc.golden rename to plutus-tx/test/Plugin/primitives/intCompare.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/intDiv.plc.golden b/plutus-tx/test/Plugin/primitives/intDiv.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/intDiv.plc.golden rename to plutus-tx/test/Plugin/primitives/intDiv.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/intEq.plc.golden b/plutus-tx/test/Plugin/primitives/intEq.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/intEq.plc.golden rename to plutus-tx/test/Plugin/primitives/intEq.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/intEqApply.plc.golden b/plutus-tx/test/Plugin/primitives/intEqApply.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/intEqApply.plc.golden rename to plutus-tx/test/Plugin/primitives/intEqApply.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/intPlus.plc.golden b/plutus-tx/test/Plugin/primitives/intPlus.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/intPlus.plc.golden rename to plutus-tx/test/Plugin/primitives/intPlus.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/intPlusApply.plc.golden b/plutus-tx/test/Plugin/primitives/intPlusApply.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/intPlusApply.plc.golden rename to plutus-tx/test/Plugin/primitives/intPlusApply.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/sha2_256.plc.golden b/plutus-tx/test/Plugin/primitives/sha2_256.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/sha2_256.plc.golden rename to plutus-tx/test/Plugin/primitives/sha2_256.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/string.plc.golden b/plutus-tx/test/Plugin/primitives/string.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/string.plc.golden rename to plutus-tx/test/Plugin/primitives/string.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/trace.plc.golden b/plutus-tx/test/Plugin/primitives/trace.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/trace.plc.golden rename to plutus-tx/test/Plugin/primitives/trace.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/tuple.plc.golden b/plutus-tx/test/Plugin/primitives/tuple.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/tuple.plc.golden rename to plutus-tx/test/Plugin/primitives/tuple.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/tupleConstDest.plc.golden b/plutus-tx/test/Plugin/primitives/tupleConstDest.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/tupleConstDest.plc.golden rename to plutus-tx/test/Plugin/primitives/tupleConstDest.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/tupleMatch.plc.golden b/plutus-tx/test/Plugin/primitives/tupleMatch.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/tupleMatch.plc.golden rename to plutus-tx/test/Plugin/primitives/tupleMatch.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/verify.plc.golden b/plutus-tx/test/Plugin/primitives/verify.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/verify.plc.golden rename to plutus-tx/test/Plugin/primitives/verify.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/primitives/void.plc.golden b/plutus-tx/test/Plugin/primitives/void.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/primitives/void.plc.golden rename to plutus-tx/test/Plugin/primitives/void.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveFunctions/even.plc.golden b/plutus-tx/test/Plugin/recursiveFunctions/even.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveFunctions/even.plc.golden rename to plutus-tx/test/Plugin/recursiveFunctions/even.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveFunctions/even3.plc.golden b/plutus-tx/test/Plugin/recursiveFunctions/even3.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveFunctions/even3.plc.golden rename to plutus-tx/test/Plugin/recursiveFunctions/even3.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveFunctions/even4.plc.golden b/plutus-tx/test/Plugin/recursiveFunctions/even4.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveFunctions/even4.plc.golden rename to plutus-tx/test/Plugin/recursiveFunctions/even4.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveFunctions/fib.plc.golden b/plutus-tx/test/Plugin/recursiveFunctions/fib.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveFunctions/fib.plc.golden rename to plutus-tx/test/Plugin/recursiveFunctions/fib.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveFunctions/fib4.plc.golden b/plutus-tx/test/Plugin/recursiveFunctions/fib4.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveFunctions/fib4.plc.golden rename to plutus-tx/test/Plugin/recursiveFunctions/fib4.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveFunctions/sum.plc.golden b/plutus-tx/test/Plugin/recursiveFunctions/sum.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveFunctions/sum.plc.golden rename to plutus-tx/test/Plugin/recursiveFunctions/sum.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveFunctions/sumList.plc.golden b/plutus-tx/test/Plugin/recursiveFunctions/sumList.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveFunctions/sumList.plc.golden rename to plutus-tx/test/Plugin/recursiveFunctions/sumList.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/listConstDest.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/listConstDest.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/listConstDest.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/listConstDest.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/listConstDest2.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/listConstDest2.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/listConstDest2.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/listConstDest2.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/listConstruct.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/listConstruct.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/listConstruct.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/listConstruct.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/listConstruct2.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/listConstruct2.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/listConstruct2.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/listConstruct2.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/listConstruct3.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/listConstruct3.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/listConstruct3.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/listConstruct3.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/listMatch.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/listMatch.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/listMatch.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/listMatch.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/polyRecEval.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/polyRecEval.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/polyRecEval.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/polyRecEval.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/ptreeConstDest.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/ptreeConstDest.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/ptreeConstDest.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/ptreeConstDest.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/ptreeConstruct.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/ptreeConstruct.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/ptreeConstruct.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/ptreeConstruct.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/ptreeFirstEval.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/ptreeFirstEval.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/ptreeFirstEval.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/ptreeFirstEval.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/ptreeMatch.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/ptreeMatch.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/ptreeMatch.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/ptreeMatch.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/sameEmptyRose.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/sameEmptyRose.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/sameEmptyRose.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/sameEmptyRose.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/recursiveTypes/sameEmptyRoseEval.plc.golden b/plutus-tx/test/Plugin/recursiveTypes/sameEmptyRoseEval.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/recursiveTypes/sameEmptyRoseEval.plc.golden rename to plutus-tx/test/Plugin/recursiveTypes/sameEmptyRoseEval.plc.golden diff --git a/plutus-tx-plugin/test/Plugin/structure/letFun.plc.golden b/plutus-tx/test/Plugin/structure/letFun.plc.golden similarity index 100% rename from plutus-tx-plugin/test/Plugin/structure/letFun.plc.golden rename to plutus-tx/test/Plugin/structure/letFun.plc.golden diff --git a/plutus-tx/test/Spec.hs b/plutus-tx/test/Spec.hs index cb7235900d9..9ea478e96c0 100644 --- a/plutus-tx/test/Spec.hs +++ b/plutus-tx/test/Spec.hs @@ -1,105 +1,19 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TemplateHaskell #-} -{-# LANGUAGE TypeApplications #-} -{-# OPTIONS_GHC -Wno-orphans #-} -{-# OPTIONS_GHC -O0 #-} - --- | Most tests for this functionality are in the plugin package, this is mainly just checking that the wiring machinery --- works. module Main (main) where -import Prelude hiding (all) +import qualified Lift.Spec as Lift +import qualified Plugin.Spec as Plugin +import qualified TH.Spec as TH import Common -import PlcTestUtils - -import TestTH - -import Language.PlutusTx.TH -import qualified Language.PlutusTx.Builtins as Builtins -import Language.PlutusTx.Prelude -import Language.PlutusTx.Evaluation - -import qualified Language.PlutusIR as PIR - -import Language.PlutusCore.Pretty -import Language.PlutusCore -import Control.Monad.Except -import Control.Exception - -import Data.Text.Prettyprint.Doc import Test.Tasty main :: IO () main = defaultMain $ runTestNestedIn ["test"] tests -instance GetProgram (CompiledCode a) where - getProgram = catchAll . getPlc - -goldenPir :: String -> CompiledCode a -> TestNested -goldenPir name value = nestedGoldenVsDoc name $ pretty $ getPir value - -runPlcCek :: GetProgram a => [a] -> ExceptT SomeException IO EvaluationResult -runPlcCek values = do - ps <- traverse getProgram values - let p = foldl1 applyProgram ps - ExceptT $ try @SomeException $ evaluate $ evaluateCek p - -runPlcCekTrace :: GetProgram a => [a] -> ExceptT SomeException IO ([String], EvaluationResult) -runPlcCekTrace values = do - ps <- traverse getProgram values - let p = foldl1 applyProgram ps - ExceptT $ try @SomeException $ evaluate $ evaluateCekTrace p - -goldenEvalCek :: GetProgram a => String -> [a] -> TestNested -goldenEvalCek name values = nestedGoldenVsDocM name $ prettyPlcClassicDebug <$> (rethrow $ runPlcCek values) - -goldenEvalCekLog :: GetProgram a => String -> [a] -> TestNested -goldenEvalCekLog name values = nestedGoldenVsDocM name $ (pretty . fst) <$> (rethrow $ runPlcCekTrace values) - tests :: TestNested -tests = testGroup "plutus-th" <$> sequence [ - goldenPir "simple" simple - , goldenPir "power" powerPlc - , goldenPir "and" andPlc - , goldenEvalCek "all" [allPlc] - , goldenEvalCek "convertString" [convertString] - , goldenEvalCekLog "traceDirect" [traceDirect] - , goldenEvalCekLog "tracePrelude" [tracePrelude] - , goldenEvalCekLog "traceRepeatedly" [traceRepeatedly] +tests = testGroup "tests" <$> sequence [ + Plugin.tests + , Lift.tests + , TH.tests ] - -simple :: CompiledCode (Bool -> Int) -simple = $$(compile [|| \(x::Bool) -> if x then (1::Int) else (2::Int) ||]) - --- similar to the power example for Feldspar - should be completely unrolled at compile time -powerPlc :: CompiledCode (Int -> Int) -powerPlc = $$(compile [|| $$(power (4::Int)) ||]) - -andPlc :: CompiledCode Bool -andPlc = $$(compile [|| $$(andTH) True False ||]) - -allPlc :: CompiledCode Bool -allPlc = $$(compile [|| $$(all) (\(x::Int) -> x > 5) [7, 6] ||]) - -convertString :: CompiledCode Builtins.String -convertString = $$(compile [|| $$(toPlutusString) "test" ||]) - -traceDirect :: CompiledCode () -traceDirect = $$(compile [|| Builtins.trace ($$(toPlutusString) "test") ||]) - -tracePrelude :: CompiledCode Int -tracePrelude = $$(compile [|| $$(trace) ($$(toPlutusString) "test") (1::Int) ||]) - -traceRepeatedly :: CompiledCode Int -traceRepeatedly = $$(compile - [|| - -- This will in fact print the third log first, and then the others, but this - -- is the same behaviour as Debug.trace - let i1 = $$(traceH) "Making my first int" (1::Int) - i2 = $$(traceH) "Making my second int" (2::Int) - i3 = $$(traceH) "Adding them up" (i1 + i2) - in i3 - ||]) diff --git a/plutus-tx/test/TH/Spec.hs b/plutus-tx/test/TH/Spec.hs new file mode 100644 index 00000000000..b887f2d4a7c --- /dev/null +++ b/plutus-tx/test/TH/Spec.hs @@ -0,0 +1,100 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeApplications #-} +{-# OPTIONS_GHC -Wno-orphans #-} +{-# OPTIONS_GHC -O0 #-} + +module TH.Spec (tests) where + +import Prelude hiding (all) + +import Common +import PlcTestUtils + +import TH.TestTH + +import Language.PlutusTx.TH +import qualified Language.PlutusTx.Builtins as Builtins +import Language.PlutusTx.Prelude +import Language.PlutusTx.Evaluation + +import qualified Language.PlutusIR as PIR + +import Language.PlutusCore.Pretty +import Language.PlutusCore + +import Control.Monad.Except +import Control.Exception + +import Data.Text.Prettyprint.Doc +import Test.Tasty + +instance GetProgram (CompiledCode a) where + getProgram = catchAll . getPlc + +goldenPir :: String -> CompiledCode a -> TestNested +goldenPir name value = nestedGoldenVsDoc name $ pretty $ getPir value + +runPlcCek :: GetProgram a => [a] -> ExceptT SomeException IO EvaluationResult +runPlcCek values = do + ps <- traverse getProgram values + let p = foldl1 applyProgram ps + ExceptT $ try @SomeException $ evaluate $ evaluateCek p + +runPlcCekTrace :: GetProgram a => [a] -> ExceptT SomeException IO ([String], EvaluationResult) +runPlcCekTrace values = do + ps <- traverse getProgram values + let p = foldl1 applyProgram ps + ExceptT $ try @SomeException $ evaluate $ evaluateCekTrace p + +goldenEvalCek :: GetProgram a => String -> [a] -> TestNested +goldenEvalCek name values = nestedGoldenVsDocM name $ prettyPlcClassicDebug <$> (rethrow $ runPlcCek values) + +goldenEvalCekLog :: GetProgram a => String -> [a] -> TestNested +goldenEvalCekLog name values = nestedGoldenVsDocM name $ (pretty . fst) <$> (rethrow $ runPlcCekTrace values) + +tests :: TestNested +tests = testNested "TH" [ + goldenPir "simple" simple + , goldenPir "power" powerPlc + , goldenPir "and" andPlc + , goldenEvalCek "all" [allPlc] + , goldenEvalCek "convertString" [convertString] + , goldenEvalCekLog "traceDirect" [traceDirect] + , goldenEvalCekLog "tracePrelude" [tracePrelude] + , goldenEvalCekLog "traceRepeatedly" [traceRepeatedly] + ] + +simple :: CompiledCode (Bool -> Int) +simple = $$(compile [|| \(x::Bool) -> if x then (1::Int) else (2::Int) ||]) + +-- similar to the power example for Feldspar - should be completely unrolled at compile time +powerPlc :: CompiledCode (Int -> Int) +powerPlc = $$(compile [|| $$(power (4::Int)) ||]) + +andPlc :: CompiledCode Bool +andPlc = $$(compile [|| $$(andTH) True False ||]) + +allPlc :: CompiledCode Bool +allPlc = $$(compile [|| $$(all) (\(x::Int) -> x > 5) [7, 6] ||]) + +convertString :: CompiledCode Builtins.String +convertString = $$(compile [|| $$(toPlutusString) "test" ||]) + +traceDirect :: CompiledCode () +traceDirect = $$(compile [|| Builtins.trace ($$(toPlutusString) "test") ||]) + +tracePrelude :: CompiledCode Int +tracePrelude = $$(compile [|| $$(trace) ($$(toPlutusString) "test") (1::Int) ||]) + +traceRepeatedly :: CompiledCode Int +traceRepeatedly = $$(compile + [|| + -- This will in fact print the third log first, and then the others, but this + -- is the same behaviour as Debug.trace + let i1 = $$(traceH) "Making my first int" (1::Int) + i2 = $$(traceH) "Making my second int" (2::Int) + i3 = $$(traceH) "Adding them up" (i1 + i2) + in i3 + ||]) diff --git a/plutus-tx/test/TestTH.hs b/plutus-tx/test/TH/TestTH.hs similarity index 96% rename from plutus-tx/test/TestTH.hs rename to plutus-tx/test/TH/TestTH.hs index 3e251a559af..119196736db 100644 --- a/plutus-tx/test/TestTH.hs +++ b/plutus-tx/test/TH/TestTH.hs @@ -1,6 +1,6 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} -module TestTH where +module TH.TestTH where import Language.Haskell.TH diff --git a/plutus-tx/test/all.plc.golden b/plutus-tx/test/TH/all.plc.golden similarity index 100% rename from plutus-tx/test/all.plc.golden rename to plutus-tx/test/TH/all.plc.golden diff --git a/plutus-tx/test/and.plc.golden b/plutus-tx/test/TH/and.plc.golden similarity index 100% rename from plutus-tx/test/and.plc.golden rename to plutus-tx/test/TH/and.plc.golden diff --git a/plutus-tx/test/convertString.plc.golden b/plutus-tx/test/TH/convertString.plc.golden similarity index 100% rename from plutus-tx/test/convertString.plc.golden rename to plutus-tx/test/TH/convertString.plc.golden diff --git a/plutus-tx/test/power.plc.golden b/plutus-tx/test/TH/power.plc.golden similarity index 100% rename from plutus-tx/test/power.plc.golden rename to plutus-tx/test/TH/power.plc.golden diff --git a/plutus-tx/test/simple.plc.golden b/plutus-tx/test/TH/simple.plc.golden similarity index 100% rename from plutus-tx/test/simple.plc.golden rename to plutus-tx/test/TH/simple.plc.golden diff --git a/plutus-tx/test/traceDirect.plc.golden b/plutus-tx/test/TH/traceDirect.plc.golden similarity index 100% rename from plutus-tx/test/traceDirect.plc.golden rename to plutus-tx/test/TH/traceDirect.plc.golden diff --git a/plutus-tx/test/tracePrelude.plc.golden b/plutus-tx/test/TH/tracePrelude.plc.golden similarity index 100% rename from plutus-tx/test/tracePrelude.plc.golden rename to plutus-tx/test/TH/tracePrelude.plc.golden diff --git a/plutus-tx/test/traceRepeatedly.plc.golden b/plutus-tx/test/TH/traceRepeatedly.plc.golden similarity index 100% rename from plutus-tx/test/traceRepeatedly.plc.golden rename to plutus-tx/test/TH/traceRepeatedly.plc.golden diff --git a/plutus-tx/tutorial/tutorial-doctests.hs b/plutus-tx/tutorial/tutorial-doctests.hs deleted file mode 100644 index 20526cae142..00000000000 --- a/plutus-tx/tutorial/tutorial-doctests.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Test.DocTest -main = doctest ["-pgmL markdown-unlit", "-isrc", "-itutorial", "--fast", "-XTemplateHaskell", "-XScopedTypeVariables", "tutorial/Tutorial.lhs", "src/Language/PlutusTx/Prelude.hs"] diff --git a/plutus-use-cases/plutus-use-cases.cabal b/plutus-use-cases/plutus-use-cases.cabal index 0da73a7d012..397710ea414 100644 --- a/plutus-use-cases/plutus-use-cases.cabal +++ b/plutus-use-cases/plutus-use-cases.cabal @@ -28,7 +28,6 @@ library mtl -any, template-haskell -any, plutus-tx -any, - plutus-tx-plugin -any, wallet-api -any, lens -any default-language: Haskell2010 @@ -68,7 +67,6 @@ test-suite plutus-use-cases-test wallet-api -any, plutus-use-cases, plutus-tx -any, - plutus-tx-plugin -any, template-haskell -any ghc-options: -Wall -Wnoncanonical-monad-instances diff --git a/stack.yaml b/stack.yaml index 1b6b3ca8add..60821dbc1f2 100644 --- a/stack.yaml +++ b/stack.yaml @@ -6,7 +6,6 @@ packages: - plutus-exe - plutus-ir - plutus-tx -- plutus-tx-plugin - plutus-use-cases - wallet-api - plutus-playground/plutus-playground-server @@ -40,8 +39,6 @@ flags: development: true wallet-api: development: true - plutus-tx-plugin: - development: true plutus-exe: development: true plutus-core-interpreter: diff --git a/wallet-api/wallet-api.cabal b/wallet-api/wallet-api.cabal index 42689695e6c..47ccdcd1881 100644 --- a/wallet-api/wallet-api.cabal +++ b/wallet-api/wallet-api.cabal @@ -61,7 +61,6 @@ library cborg -any, containers -any, plutus-tx -any, - plutus-tx-plugin -any, cryptonite >=0.25, hashable -any, hedgehog -any, @@ -114,7 +113,6 @@ test-suite wallet-api-test transformers -any, wallet-api -any, plutus-tx -any, - plutus-tx-plugin -any, lens -any test-suite wallet-api-doctests @@ -131,7 +129,6 @@ test-suite wallet-api-doctests build-depends: base >=4.9 && <5, plutus-tx -any, - plutus-tx-plugin -any, wallet-api -any, doctest -any