From caa5014bd12a8138ecc30169791298af55933991 Mon Sep 17 00:00:00 2001 From: zeme-iohk Date: Wed, 15 Jun 2022 11:02:27 +0200 Subject: [PATCH] =?UTF-8?q?PLT-42=20Added=20cabal-fmt=20to=20pre-commit=20?= =?UTF-8?q?hooks=20&=20reformatted=20all=20existing=E2=80=A6=20(#505)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * PLT-42 Added cabal-fmt to pre-commit hooks & reformatted all existing cabal files * Created fix-cabal-fmt script and added to shell * Added CI test for cabal-fmt * Updated CONTRIBUTING.adoc to include addition of cabal-fmt * Replaced occurences of iohk/plutus with input-output-hk/plutus-apps --- CONTRIBUTING.adoc | 10 +- default.nix | 2 +- doc/plutus-doc.cabal | 179 ++-- freer-extras/freer-extras.cabal | 153 ++-- nix/pkgs/default.nix | 6 +- nix/pkgs/fix-cabal-fmt/default.nix | 10 + nix/pkgs/haskell/extra.nix | 15 + nix/tests/cabal-fmt.nix | 39 + nix/tests/default.nix | 6 + playground-common/playground-common.cabal | 235 ++--- .../plutus-chain-index-core.cabal | 283 +++--- plutus-chain-index/plutus-chain-index.cabal | 195 ++-- .../plutus-contract-certification.cabal | 89 +- plutus-contract/plutus-contract.cabal | 493 +++++----- plutus-example/plutus-example.cabal | 267 +++--- .../plutus-ledger-constraints.cabal | 151 ++-- plutus-ledger/plutus-ledger.cabal | 290 +++--- .../plutus-pab-executables.cabal | 841 +++++++++--------- plutus-pab/plutus-pab.cabal | 436 ++++----- .../plutus-playground-server.cabal | 480 +++++----- plutus-script-utils/plutus-script-utils.cabal | 137 +-- plutus-streaming/plutus-streaming.cabal | 159 ++-- .../plutus-tx-constraints.cabal | 146 +-- plutus-use-cases/plutus-use-cases.cabal | 480 +++++----- quickcheck-dynamic/quickcheck-dynamic.cabal | 116 +-- shell.nix | 6 +- web-ghc/web-ghc.cabal | 159 ++-- 27 files changed, 2821 insertions(+), 2562 deletions(-) create mode 100644 nix/pkgs/fix-cabal-fmt/default.nix create mode 100644 nix/tests/cabal-fmt.nix diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index f2662bcc57..4af2aa4057 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -257,13 +257,11 @@ you could write a Note describing the trick (and justifying its usage!), and the === Code formatting -We use `stylish-haskell` for Haskell code formatting, and `purs-tidy` for Purescript. -CI checks that running these is a no-op, so if you don’t apply it them your PR will not go green. -To avoid annoyance, set up your editor to run them automatically. -The `nix-shell` environment provides `stylish-haskell` and `purs-tidy` binaries of the correct versions. +We use `stylish-haskell` for Haskell code formatting, `purs-tidy` for Purescript, and `cabal-fmt` for cabal files. +They are run automatically as pre-commit hooks, but CI will run them again and expect that to be a no-op, so if you somehow don’t apply them your PR will not go green. -You can run `stylish-haskell` or `purs-tidy` over your tree using the -`fix-stylish-haskell` or `fix-purs-tidy` script provided by the `nix-shell` environment. +To run `stylish-haskell`, `purs-tidy` or `cabal-fmt` manually over your tree, type `fix-stylish-haskell`, `fix-purs-tidy` or `fix-cabal-fmt` respectively. +They are provided by the `nix-shell` environment. === Compiler warnings diff --git a/default.nix b/default.nix index 71baf92856..93659accc0 100644 --- a/default.nix +++ b/default.nix @@ -67,7 +67,7 @@ rec { tests = import ./nix/tests/default.nix { inherit pkgs docs; inherit (plutus-apps.lib) gitignore-nix; - inherit (plutus-apps) fixStylishHaskell fix-purs-tidy fixPngOptimization; + inherit (plutus-apps) fixStylishHaskell fix-purs-tidy fixPngOptimization fixCabalFmt; inherit plutus-playground web-ghc; src = ./.; play-generated = plutus-playground.generated-purescript; diff --git a/doc/plutus-doc.cabal b/doc/plutus-doc.cabal index 862d678a11..c3866a0860 100644 --- a/doc/plutus-doc.cabal +++ b/doc/plutus-doc.cabal @@ -1,97 +1,110 @@ cabal-version: 2.2 -name: plutus-doc -version: 0.1.0.0 -license: Apache-2.0 +name: plutus-doc +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: jann.mueller@iohk.io -author: Michael Peyton Jones, Jann Mueller -synopsis: Plutus documentation -description: Plutus documentation -category: Language -build-type: Simple + +maintainer: jann.mueller@iohk.io +author: Michael Peyton Jones, Jann Mueller +synopsis: Plutus documentation +description: Plutus documentation +category: Language +build-type: Simple source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. + + default: False + manual: True common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable MultiParamTypeClasses - ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -Wmissing-import-lists - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + MultiParamTypeClasses + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wredundant-constraints -Widentities + -Wmissing-import-lists -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas - if flag(defer-plugin-errors) + if flag(defer-plugin-errors) executable doc-doctests - import: lang - if(impl(ghcjs) || os(windows)) - buildable: False - hs-source-dirs: - plutus/tutorials - plutus/howtos - plutus/architecture/constraints - main-is: Main.hs - build-tool-depends: doctest:doctest -any - other-modules: - BasicPlutusTx - BasicValidators - BasicPolicies - BasicApps - BasicAppConstraints - GameModel - HandlingBlockchainEvents - HelloWorldApp - WriteScriptsTo - Escrow - Escrow2 - Escrow3 - Escrow4 - Escrow5 - Escrow6 - EscrowImpl - build-depends: - base >=4.9 && <5, - template-haskell >=2.13.0.0, - bytestring -any, - data-default -any, - flat -any, - plutus-core -any, - plutus-chain-index-core -any, - plutus-tx -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-script-utils -any, - plutus-tx-constraints -any, - plutus-contract -any, - playground-common -any, - plutus-use-cases -any, - quickcheck-dynamic -any, - containers -any, - freer-extras -any, - lens -any, - serialise -any, - QuickCheck -any, - random -any, - text -any, - aeson -any, - tasty -any, - tasty-quickcheck -any + import: lang + + if (impl(ghcjs) || os(windows)) + buildable: False + + hs-source-dirs: plutus/tutorials plutus/howtos plutus/architecture/constraints + main-is: Main.hs + ghc-options: -Wno-unused-imports + build-tool-depends: doctest:doctest + other-modules: + BasicApps + BasicAppConstraints + BasicPlutusTx + BasicPolicies + BasicValidators + Escrow + Escrow2 + Escrow3 + Escrow4 + Escrow5 + Escrow6 + EscrowImpl + GameModel + HandlingBlockchainEvents + HelloWorldApp + WriteScriptsTo + + build-depends: + , aeson + , base >=4.9 && <5 + , bytestring + , containers + , data-default + , flat + , freer-extras + , lens + , playground-common + , plutus-chain-index-core + , plutus-contract + , plutus-core + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + , plutus-tx-constraints + , plutus-use-cases + , QuickCheck + , quickcheck-dynamic + , random + , serialise + , tasty + , tasty-quickcheck + , template-haskell >=2.13.0.0 + , text - if !(impl(ghcjs) || os(ghcjs)) - build-depends: plutus-tx-plugin -any + if !(impl(ghcjs) || os(ghcjs)) + build-depends: plutus-tx-plugin diff --git a/freer-extras/freer-extras.cabal b/freer-extras/freer-extras.cabal index f15635772d..666a2efe63 100644 --- a/freer-extras/freer-extras.cabal +++ b/freer-extras/freer-extras.cabal @@ -1,81 +1,94 @@ -cabal-version: 2.2 -name: freer-extras -version: 0.1.0.0 -synopsis: Useful extensions to simple-freer -description: freer-extras provides logging and monitoring functions extending simple-freer -bug-reports: https://github.com/iohk/plutus/issues -license: Apache-2.0 -license-file: LICENSE -author: Tobias Pflug -maintainer: tobias.pflug@iohk.io -build-type: Simple +cabal-version: 2.2 +name: freer-extras +version: 0.1.0.0 +synopsis: Useful extensions to simple-freer +description: + freer-extras provides logging and monitoring functions extending simple-freer + +bug-reports: https://github.com/input-output-hk/plutus-apps/issues +license: Apache-2.0 +license-file: LICENSE +author: Tobias Pflug +maintainer: tobias.pflug@iohk.io +build-type: Simple source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + ScopedTypeVariables + StandaloneDeriving + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities library - import: lang - hs-source-dirs: src + import: lang + hs-source-dirs: src exposed-modules: - Control.Monad.Freer.Extras - Control.Monad.Freer.Extras.Beam - Control.Monad.Freer.Extras.Log - Control.Monad.Freer.Extras.Modify - Control.Monad.Freer.Extras.Pagination - Control.Monad.Freer.Extras.State - Control.Monad.Freer.Extras.Stream + Control.Monad.Freer.Extras + Control.Monad.Freer.Extras.Beam + Control.Monad.Freer.Extras.Log + Control.Monad.Freer.Extras.Modify + Control.Monad.Freer.Extras.Pagination + Control.Monad.Freer.Extras.State + Control.Monad.Freer.Extras.Stream + build-depends: - aeson -any, - base >=4.7 && <5, - beam-core -any, - beam-sqlite -any, - containers -any, - data-default -any, - freer-simple -any, - iohk-monitoring -any, - lens -any, - mtl -any, - openapi3 -any, - prettyprinter -any, - resource-pool -any, - sqlite-simple -any, - streaming -any, - text -any, + , aeson + , base >=4.7 && <5 + , beam-core + , beam-sqlite + , containers + , data-default + , freer-simple + , iohk-monitoring + , lens + , mtl + , openapi3 + , prettyprinter + , resource-pool + , sqlite-simple + , streaming + , text test-suite freer-extras-test - import: lang - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - Control.Monad.Freer.Extras.BeamSpec - Control.Monad.Freer.Extras.PaginationSpec - build-depends: - hedgehog -any, - tasty -any, - tasty-hedgehog -any, - build-depends: - base >=4.7 && <5, - beam-core -any, - beam-migrate -any, - beam-sqlite -any, - containers -any, - contra-tracer -any, - freer-extras -any, - freer-simple -any, - lens -any, - resource-pool -any, - semigroups -any, - sqlite-simple -any, + import: lang + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + other-modules: + Control.Monad.Freer.Extras.BeamSpec + Control.Monad.Freer.Extras.PaginationSpec + + build-depends: + , hedgehog + , tasty + , tasty-hedgehog + + build-depends: + , base >=4.7 && <5 + , beam-core + , beam-migrate + , beam-sqlite + , containers + , contra-tracer + , freer-extras + , freer-simple + , lens + , resource-pool + , semigroups + , sqlite-simple diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index c9f24f91f7..f0ed317f2d 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -26,6 +26,7 @@ let cabal-install = haskell.extraPackages.cabal-install.components.exes.cabal; cardano-repo-tool = exeFromExtras "cardano-repo-tool"; stylish-haskell = exeFromExtras "stylish-haskell"; + cabal-fmt = exeFromExtras "cabal-fmt"; hlint = exeFromExtras "hlint"; haskell-language-server = exeFromExtras "haskell-language-server"; haskell-language-server-wrapper = pkgs.writeShellScriptBin "haskell-language-server-wrapper" ''${haskell-language-server}/bin/haskell-language-server "$@"''; @@ -35,6 +36,7 @@ let # dev convenience scripts # fix-purs-tidy = pkgs.callPackage ./fix-purs-tidy { inherit purs-tidy; }; + fixCabalFmt = pkgs.callPackage ./fix-cabal-fmt { inherit cabal-fmt; }; fixStylishHaskell = pkgs.callPackage ./fix-stylish-haskell { inherit stylish-haskell; }; fixPngOptimization = pkgs.callPackage ./fix-png-optimization { }; updateClientDeps = pkgs.callPackage ./update-client-deps { @@ -108,9 +110,9 @@ in { inherit sphinx-markdown-tables sphinxemoji sphinxcontrib-haddock; inherit nix-pre-commit-hooks; - inherit haskell cabal-install cardano-repo-tool stylish-haskell hlint haskell-language-server haskell-language-server-wrapper hie-bios; + inherit haskell cabal-install cardano-repo-tool stylish-haskell hlint haskell-language-server haskell-language-server-wrapper hie-bios cabal-fmt; inherit purs-tidy purs spago spago2nix purescript-language-server psa; - inherit fix-purs-tidy fixStylishHaskell fixPngOptimization updateClientDeps; + inherit fix-purs-tidy fixStylishHaskell fixCabalFmt fixPngOptimization updateClientDeps; inherit web-ghc; inherit easyPS plutus-haddock-combined; inherit lib; diff --git a/nix/pkgs/fix-cabal-fmt/default.nix b/nix/pkgs/fix-cabal-fmt/default.nix new file mode 100644 index 0000000000..98118750d5 --- /dev/null +++ b/nix/pkgs/fix-cabal-fmt/default.nix @@ -0,0 +1,10 @@ +{ writeShellScriptBin, fd, cabal-fmt }: + +writeShellScriptBin "fix-cabal-fmt" '' + ${fd}/bin/fd \ + --extension cabal \ + --exclude 'dist-newstyle/*' \ + --exclude 'dist/*' \ + --exclude '.stack-work/*' \ + --exec bash -c "${cabal-fmt}/bin/cabal-fmt --inplace {}" +'' diff --git a/nix/pkgs/haskell/extra.nix b/nix/pkgs/haskell/extra.nix index 317a02d9a8..36f4a94fdf 100644 --- a/nix/pkgs/haskell/extra.nix +++ b/nix/pkgs/haskell/extra.nix @@ -14,6 +14,20 @@ , writeShellScript }: let + # TODO Remove this patch once the PR gets merged upstream. + # See https://github.com/phadej/cabal-fmt/pull/45 + cabalFmtProject = haskell-nix.cabalProject' { + src = buildPackages.fetchgit { + url = "https://github.com/zeme-iohk/cabal-fmt.git"; + rev = "7b5c9b4fac55aad15a0b33bcd22b40a244bf30af"; + sha256 = "04w1dy83ml7wgm5ay1rd4kiwfmdd9sc2y8bp3l0ja7xwvh4fgkmr"; + }; + # Cabal is a boot library, so haskell.nix would normally use the one coming + # from the compiler-nix-name (currently 3.2). However cabal-fmt depends on + # Cabal library version 3.6, hence we add this line. + modules = [{ reinstallableLibGhc = true; }]; + inherit compiler-nix-name index-state; + }; cabalInstallProject = haskell-nix.hackage-project { name = "cabal-install"; version = "3.6.2.0"; @@ -55,4 +69,5 @@ in inherit (hlsProject.hsPkgs) haskell-language-server hie-bios implicit-hie stylish-haskell hlint; inherit (cabalInstallProject.hsPkgs) cabal-install; inherit (cardanoRepoToolProject.hsPkgs) cardano-repo-tool; + inherit (cabalFmtProject.hsPkgs) cabal-fmt; } diff --git a/nix/tests/cabal-fmt.nix b/nix/tests/cabal-fmt.nix new file mode 100644 index 0000000000..70eb37f500 --- /dev/null +++ b/nix/tests/cabal-fmt.nix @@ -0,0 +1,39 @@ +{ runCommand, fixCabalFmt, src, lib, diffutils, glibcLocales }: +let + src' = lib.cleanSourceWith { + inherit src; + filter = with lib; + name: type: + let baseName = baseNameOf (toString name); in + ( + (type == "regular" && hasSuffix ".cabal" baseName) || + (type == "directory" && (baseName != "dist-newstyle" && baseName != "dist" && baseName != ".stack-work")) + ); + }; +in +runCommand "cabal-fmt" +{ + buildInputs = [ fixCabalFmt diffutils glibcLocales ]; +} '' + set +e + cp -a ${src'} orig + cp -a ${src'} cabal + chmod -R +w cabal + cd cabal + fix-cabal-fmt + cd .. + diff --brief --recursive orig cabal > /dev/null + EXIT_CODE=$? + if [[ $EXIT_CODE != 0 ]] + then + mkdir -p $out/nix-support + diff -ur orig cabal > $out/cabal.diff + echo "file none $out/cabal.diff" > $out/nix-support/hydra-build-products + echo "*** cabal-fmt found changes that need addressed first" + echo "*** Please run \`fix-stylish-haskell\` and commit changes" + echo "*** or apply the diff generated by hydra if you don't have nix." + exit $EXIT_CODE + else + echo $EXIT_CODE > $out + fi +'' diff --git a/nix/tests/default.nix b/nix/tests/default.nix index f58ca4b451..33b159cbc3 100644 --- a/nix/tests/default.nix +++ b/nix/tests/default.nix @@ -2,6 +2,7 @@ , gitignore-nix , fixStylishHaskell , fix-purs-tidy +, fixCabalFmt , fixPngOptimization , src , play-generated @@ -38,6 +39,11 @@ pkgs.recurseIntoAttrs { inherit (pkgs) nixpkgs-fmt; }; + cabalFmt = pkgs.callPackage ./cabal-fmt.nix { + src = cleanSrc; + inherit fixCabalFmt; + }; + pngOptimization = pkgs.callPackage ./png-optimization.nix { src = cleanSrc; inherit fixPngOptimization; diff --git a/playground-common/playground-common.cabal b/playground-common/playground-common.cabal index 0a1550c516..ca35b9f7f6 100644 --- a/playground-common/playground-common.cabal +++ b/playground-common/playground-common.cabal @@ -1,123 +1,128 @@ cabal-version: 2.0 -name: playground-common -version: 0.1.0.0 -license: Apache-2.0 +name: playground-common +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -author: David Smith -category: Web -build-type: Simple -data-files: - test/oAuthToken1.json + +author: David Smith +category: Web +build-type: Simple +data-files: test/oAuthToken1.json library - exposed-modules: - Auth - Auth.Types - Control.Monad.Except.Extras - Control.Monad.Now - Control.Monad.Trace - Control.Monad.Web - Gist - Language.Haskell.Interpreter - PSGenerator.Common - Playground.API - Playground.Contract - Playground.Interpreter.Util - Playground.Schema - Playground.TH - Playground.Types - Schema - Servant.Extra - Servant.Prometheus - System.IO.Extras - hs-source-dirs: src - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -Wall -Wcompat -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wmissing-import-lists -Wredundant-constraints - build-depends: - aeson -any, - aeson-casing -any, - base >=4.7 && <5, - bytestring -any, - bytestring -any, - cookie -any, - cryptonite -any, - containers -any, - data-default -any, - deriving-compat -any, - exceptions -any, - hashable -any, - http-client -any, - http-client-tls -any, - http-types -any, - http-conduit -any, - jwt -any, - lens -any, - monad-logger -any, - mtl -any, - newtype-generics -any, - process -any, - prometheus >=2, - plutus-chain-index-core -any, - plutus-contract -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - row-types -any, - prettyprinter -any, - plutus-tx -any, - purescript-bridge -any, - recursion-schemes < 5.2, - servant >= 0.16, - servant-client -any, - servant-purescript -any, - servant-server -any, - servant-websockets -any, - template-haskell -any, - text -any, - time -any, - time-out -any, - time-units -any, - transformers -any, - unordered-containers -any, - wai -any, - freer-simple -any, - freer-extras, - uuid -any, - streaming -any, - foldl -any, - openapi3 -any + exposed-modules: + Auth + Auth.Types + Control.Monad.Except.Extras + Control.Monad.Now + Control.Monad.Trace + Control.Monad.Web + Gist + Language.Haskell.Interpreter + Playground.API + Playground.Contract + Playground.Interpreter.Util + Playground.Schema + Playground.TH + Playground.Types + PSGenerator.Common + Schema + Servant.Extra + Servant.Prometheus + System.IO.Extras + + hs-source-dirs: src + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: + -Wall -Wcompat -Wunused-packages -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wmissing-import-lists + -Wredundant-constraints + + build-depends: + aeson + , aeson-casing + , base >=4.7 && <5 + , bytestring + , containers + , cookie + , cryptonite + , data-default + , deriving-compat + , exceptions + , foldl + , freer-extras + , freer-simple + , hashable + , http-client + , http-client-tls + , http-conduit + , http-types + , jwt + , lens + , monad-logger + , mtl + , newtype-generics + , openapi3 + , plutus-chain-index-core + , plutus-contract + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-tx + , prettyprinter + , process + , prometheus >=2 + , purescript-bridge + , recursion-schemes <5.2 + , row-types + , servant >=0.16 + , servant-client + , servant-purescript + , servant-server + , servant-websockets + , streaming + , template-haskell + , text + , time + , time-out + , time-units + , transformers + , unordered-containers + , uuid + , wai test-suite playground-common-test - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - Paths_playground_common - Auth.TypesSpec - Language.Haskell.InterpreterSpec - Playground.THSpec - Playground.TypesSpec - SchemaSpec - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wmissing-import-lists -Wredundant-constraints - -fprint-potential-instances -Wunused-packages - build-depends: - aeson -any, - base >=4.7 && <5, - bytestring -any, - tasty -any, - tasty-hunit -any, - freer-simple -any, - playground-common -any, - plutus-ledger -any, - plutus-contract -any, - recursion-schemes < 5.2, - text -any + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + other-modules: + Auth.TypesSpec + Language.Haskell.InterpreterSpec + Paths_playground_common + Playground.THSpec + Playground.TypesSpec + SchemaSpec + + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wmissing-import-lists -Wredundant-constraints + -fprint-potential-instances -Wunused-packages + + build-depends: + aeson + , base >=4.7 && <5 + , bytestring + , freer-simple + , playground-common + , plutus-contract + , plutus-ledger + , recursion-schemes <5.2 + , tasty + , tasty-hunit + , text diff --git a/plutus-chain-index-core/plutus-chain-index-core.cabal b/plutus-chain-index-core/plutus-chain-index-core.cabal index 6fe15676d6..a3c48cd4f8 100644 --- a/plutus-chain-index-core/plutus-chain-index-core.cabal +++ b/plutus-chain-index-core/plutus-chain-index-core.cabal @@ -1,147 +1,162 @@ cabal-version: 2.2 -name: plutus-chain-index-core -version: 0.1.0.0 -license: Apache-2.0 +name: plutus-chain-index-core +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: sjoerd.visscher@iohk.io -author: Sjoerd Visscher -homepage: https://github.com/iohk/plutus#readme -bug-reports: https://github.com/iohk/plutus/issues + +maintainer: sjoerd.visscher@iohk.io +author: Sjoerd Visscher +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues description: - Please see the README on GitHub at -build-type: Simple + Please see the README on GitHub at + +build-type: Simple source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + ScopedTypeVariables + StandaloneDeriving + + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities library - import: lang - exposed-modules: - Plutus.ChainIndex - Plutus.ChainIndex.Api - Plutus.ChainIndex.ChainIndexError - Plutus.ChainIndex.ChainIndexLog - Plutus.ChainIndex.Client - Plutus.ChainIndex.DbSchema - Plutus.ChainIndex.Effects - Plutus.ChainIndex.Emulator - Plutus.ChainIndex.Emulator.DiskState - Plutus.ChainIndex.Emulator.Handlers - Plutus.ChainIndex.Emulator.Server - Plutus.ChainIndex.Handlers - Plutus.ChainIndex.Server - Plutus.ChainIndex.Tx - Plutus.ChainIndex.TxIdState - Plutus.ChainIndex.TxOutBalance - Plutus.ChainIndex.TxUtxoBalance - Plutus.ChainIndex.Types - Plutus.ChainIndex.UtxoState - Plutus.Monitoring.Util - Cardano.Protocol.Socket.Type - Cardano.Protocol.Socket.Client - Plutus.ChainIndex.Compatibility - Plutus.Contract.CardanoAPI - hs-source-dirs: src - build-depends: - plutus-ledger -any, - plutus-ledger-api -any, - plutus-script-utils -any, - plutus-tx -any, - freer-extras -any, - build-depends: - aeson -any, - base >=4.7 && <5, - beam-core -any, - beam-sqlite -any, - beam-migrate -any, - cardano-api -any, - cardano-ledger-byron -any, - containers -any, - contra-tracer -any, - cryptonite -any, - data-default -any, - exceptions -any, - fingertree -any, - freer-simple -any, - io-classes -any, - iohk-monitoring -any, - lens -any, - memory -any, - nothunks -any, - openapi3 -any, - ouroboros-network -any, - ouroboros-network-framework -any, - ouroboros-consensus -any, - ouroboros-consensus-byron -any, - ouroboros-consensus-cardano -any, - ouroboros-consensus-shelley -any, - prettyprinter >=1.1.0.1, - retry -any, - semigroups -any, - serialise -any, - sqlite-simple -any, - typed-protocols -any, - unordered-containers -any, - bytestring -any, - text -any, - resource-pool -any, - servant -any, - servant-openapi3 -any, - servant-server -any, - servant-swagger-ui -any, - stm -any, - mtl -any, - warp -any, - servant-client -any, - servant-client-core -any, - http-types -any, - text-class -any + import: lang + exposed-modules: + Cardano.Protocol.Socket.Client + Cardano.Protocol.Socket.Type + Plutus.ChainIndex + Plutus.ChainIndex.Api + Plutus.ChainIndex.ChainIndexError + Plutus.ChainIndex.ChainIndexLog + Plutus.ChainIndex.Client + Plutus.ChainIndex.Compatibility + Plutus.ChainIndex.DbSchema + Plutus.ChainIndex.Effects + Plutus.ChainIndex.Emulator + Plutus.ChainIndex.Emulator.DiskState + Plutus.ChainIndex.Emulator.Handlers + Plutus.ChainIndex.Emulator.Server + Plutus.ChainIndex.Handlers + Plutus.ChainIndex.Server + Plutus.ChainIndex.Tx + Plutus.ChainIndex.TxIdState + Plutus.ChainIndex.TxOutBalance + Plutus.ChainIndex.TxUtxoBalance + Plutus.ChainIndex.Types + Plutus.ChainIndex.UtxoState + Plutus.Contract.CardanoAPI + Plutus.Monitoring.Util + + hs-source-dirs: src + build-depends: + , freer-extras + , plutus-ledger + , plutus-ledger-api + , plutus-script-utils + , plutus-tx + + build-depends: + , aeson + , base >=4.7 && <5 + , beam-core + , beam-migrate + , beam-sqlite + , bytestring + , cardano-api + , cardano-ledger-byron + , containers + , contra-tracer + , cryptonite + , data-default + , exceptions + , fingertree + , freer-simple + , http-types + , io-classes + , iohk-monitoring + , lens + , memory + , mtl + , nothunks + , openapi3 + , ouroboros-consensus + , ouroboros-consensus-byron + , ouroboros-consensus-cardano + , ouroboros-consensus-shelley + , ouroboros-network + , ouroboros-network-framework + , prettyprinter >=1.1.0.1 + , resource-pool + , retry + , semigroups + , serialise + , servant + , servant-client + , servant-client-core + , servant-openapi3 + , servant-server + , servant-swagger-ui + , sqlite-simple + , stm + , text + , text-class + , typed-protocols + , unordered-containers + , warp test-suite plutus-chain-index-test - import: lang - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - Generators - Plutus.ChainIndex.Emulator.DiskStateSpec - Plutus.ChainIndex.Emulator.HandlersSpec - Plutus.ChainIndex.HandlersSpec - Util - build-depends: - plutus-ledger -any, - plutus-ledger-api -any, - plutus-tx -any, - plutus-chain-index-core -any - build-depends: - base >=4.9 && <5, - beam-migrate -any, - beam-sqlite -any, - bytestring -any, - containers -any, - contra-tracer -any, - data-default -any, - fingertree -any, - freer-extras -any, - freer-simple -any, - hedgehog -any, - lens -any, - resource-pool -any, - serialise -any, - stm -any, - sqlite-simple -any, - tasty -any, - tasty-hedgehog -any, + import: lang + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + other-modules: + Generators + Plutus.ChainIndex.Emulator.DiskStateSpec + Plutus.ChainIndex.Emulator.HandlersSpec + Plutus.ChainIndex.HandlersSpec + Util + + build-depends: + , plutus-chain-index-core + , plutus-ledger + , plutus-ledger-api + , plutus-tx + + build-depends: + , base >=4.9 && <5 + , beam-migrate + , beam-sqlite + , bytestring + , containers + , contra-tracer + , data-default + , fingertree + , freer-extras + , freer-simple + , hedgehog + , lens + , resource-pool + , serialise + , sqlite-simple + , stm + , tasty + , tasty-hedgehog diff --git a/plutus-chain-index/plutus-chain-index.cabal b/plutus-chain-index/plutus-chain-index.cabal index 9c2dc6257a..a41da4d6de 100644 --- a/plutus-chain-index/plutus-chain-index.cabal +++ b/plutus-chain-index/plutus-chain-index.cabal @@ -1,116 +1,131 @@ cabal-version: 2.2 -name: plutus-chain-index -version: 0.1.0.0 -license: Apache-2.0 +name: plutus-chain-index +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: sjoerd.visscher@iohk.io -author: Sjoerd Visscher -homepage: https://github.com/iohk/plutus#readme -bug-reports: https://github.com/iohk/plutus/issues + +maintainer: sjoerd.visscher@iohk.io +author: Sjoerd Visscher +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues description: - Please see the README on GitHub at -build-type: Simple + Please see the README on GitHub at + +build-type: Simple source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -Wmissing-import-lists + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + ScopedTypeVariables + StandaloneDeriving + + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities -Wmissing-import-lists library - import: lang - exposed-modules: - Plutus.ChainIndex.App - Plutus.ChainIndex.Events - Plutus.ChainIndex.CommandLine - Plutus.ChainIndex.Config - Plutus.ChainIndex.Lib - Plutus.ChainIndex.Logging - Plutus.ChainIndex.SyncStats - other-modules: - Control.Concurrent.STM.TBMQueue - hs-source-dirs: src - build-depends: - plutus-ledger, - plutus-ledger-api, - plutus-chain-index-core, - freer-extras - build-depends: - aeson, - async, - base >=4.7 && <5, - beam-sqlite, - beam-migrate, - cardano-api, - contra-tracer, - clock, - data-default, - freer-simple, - iohk-monitoring, - lens, - optparse-applicative, - ouroboros-network, - prettyprinter >=1.1.0.1, - resource-pool, - sqlite-simple, - stm, - time-units, - yaml, + import: lang + exposed-modules: + Plutus.ChainIndex.App + Plutus.ChainIndex.CommandLine + Plutus.ChainIndex.Config + Plutus.ChainIndex.Events + Plutus.ChainIndex.Lib + Plutus.ChainIndex.Logging + Plutus.ChainIndex.SyncStats + + other-modules: Control.Concurrent.STM.TBMQueue + hs-source-dirs: src + build-depends: + , freer-extras + , plutus-chain-index-core + , plutus-ledger + , plutus-ledger-api + + build-depends: + , aeson + , async + , base >=4.7 && <5 + , beam-migrate + , beam-sqlite + , cardano-api + , clock + , contra-tracer + , data-default + , freer-simple + , iohk-monitoring + , lens + , optparse-applicative + , ouroboros-network + , prettyprinter >=1.1.0.1 + , resource-pool + , sqlite-simple + , stm + , time-units + , yaml executable plutus-chain-index - main-is: Main.hs - hs-source-dirs: app - default-language: Haskell2010 + main-is: Main.hs + hs-source-dirs: app + default-language: Haskell2010 default-extensions: ImportQualifiedPost ghc-options: - -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints -O0 + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints -O0 + build-depends: - base >=4.9 && <5, - plutus-chain-index + , base >=4.9 && <5 + , plutus-chain-index executable marconi - main-is: Marconi.hs - hs-source-dirs: app + main-is: Marconi.hs + hs-source-dirs: app other-modules: Marconi.Index.Datum Marconi.Index.Utxo Marconi.Logging Marconi.Orphans - default-language: Haskell2010 + + default-language: Haskell2010 default-extensions: ImportQualifiedPost ghc-options: - -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints -O0 + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints -O0 + build-depends: - base >=4.9 && <5, - bytestring, - cardano-api, - containers, - hysterical-screams, - iohk-monitoring, - lens, - optparse-applicative, - plutus-chain-index, - plutus-chain-index-core, - plutus-ledger, - plutus-script-utils, - plutus-streaming, - prettyprinter, - serialise, - sqlite-simple, - streaming, - text, - time, + , base >=4.9 && <5 + , bytestring + , cardano-api + , containers + , hysterical-screams + , iohk-monitoring + , lens + , optparse-applicative + , plutus-chain-index + , plutus-chain-index-core + , plutus-ledger + , plutus-script-utils + , plutus-streaming + , prettyprinter + , serialise + , sqlite-simple + , streaming + , text + , time diff --git a/plutus-contract-certification/plutus-contract-certification.cabal b/plutus-contract-certification/plutus-contract-certification.cabal index 2e1fe67e68..ac5949f52d 100644 --- a/plutus-contract-certification/plutus-contract-certification.cabal +++ b/plutus-contract-certification/plutus-contract-certification.cabal @@ -1,48 +1,63 @@ cabal-version: 3.0 -name: plutus-contract-certification -version: 0.1.0.0 -license: Apache-2.0 +name: plutus-contract-certification +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -homepage: https://github.com/iohk/plutus-apps#readme -bug-reports: https://github.com/iohk/plutus-apps/issues + +homepage: https://github.com/input-output-hk/plutus-apps-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps-apps/issues description: - Please see the README on GitHub at -build-type: Simple + Please see the README on GitHub at + +build-type: Simple source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables MultiParamTypeClasses - DeriveGeneric StandaloneDeriving DeriveLift FlexibleContexts - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + FlexibleContexts + GeneralizedNewtypeDeriving + ImportQualifiedPost + MultiParamTypeClasses + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities -fobject-code + -fno-ignore-interface-pragmas -fno-omit-interface-pragmas library - import: lang - exposed-modules: - Plutus.Contract.Test.Certification - Plutus.Contract.Test.Certification.Run - hs-source-dirs: src - build-depends: - base >=4.7 && <5, - containers -any, - lens -any, - plutus-contract -any, - plutus-tx -any, - QuickCheck -any, - stm -any, - tasty -any, - aeson -any, - splitmix -any, - bytestring -any, - mtl -any + import: lang + exposed-modules: + Plutus.Contract.Test.Certification + Plutus.Contract.Test.Certification.Run + + hs-source-dirs: src + build-depends: + , aeson + , base >=4.7 && <5 + , bytestring + , containers + , lens + , mtl + , plutus-contract + , plutus-tx + , QuickCheck + , splitmix + , stm + , tasty diff --git a/plutus-contract/plutus-contract.cabal b/plutus-contract/plutus-contract.cabal index a238a5b627..17cc1b8173 100644 --- a/plutus-contract/plutus-contract.cabal +++ b/plutus-contract/plutus-contract.cabal @@ -1,252 +1,275 @@ cabal-version: 3.0 -name: plutus-contract -version: 0.1.0.0 -license: Apache-2.0 +name: plutus-contract +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: jann.mueller@iohk.io -author: Jann Müller -homepage: https://github.com/input-output-hk/plutus-apps#readme -bug-reports: https://github.com/input-output-hk/plutus-apps/issues + +maintainer: jann.mueller@iohk.io +author: Jann Müller +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues description: - Please see the README on GitHub at -build-type: Simple + Please see the README on GitHub at + +build-type: Simple source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables MultiParamTypeClasses - DeriveGeneric StandaloneDeriving DeriveLift FlexibleContexts - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + FlexibleContexts + GeneralizedNewtypeDeriving + ImportQualifiedPost + MultiParamTypeClasses + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities -fobject-code + -fno-ignore-interface-pragmas -fno-omit-interface-pragmas flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. + + default: False + manual: True library - import: lang + import: lang + exposed-modules: + Data.Row.Extras + Data.Text.Extras + Data.UUID.Extras + Plutus.Contract + Plutus.Contract.Checkpoint + Plutus.Contract.Constraints + Plutus.Contract.Effects + Plutus.Contract.Error + Plutus.Contract.Logging + Plutus.Contract.Oracle + Plutus.Contract.Request + Plutus.Contract.Resumable + Plutus.Contract.Schema + Plutus.Contract.Secrets + Plutus.Contract.State + Plutus.Contract.StateMachine + Plutus.Contract.StateMachine.MintingPolarity + Plutus.Contract.StateMachine.OnChain + Plutus.Contract.StateMachine.ThreadToken + Plutus.Contract.Trace + Plutus.Contract.Trace.RequestHandler + Plutus.Contract.Tx + Plutus.Contract.Typed.Tx + Plutus.Contract.Types + Plutus.Contract.Util + Plutus.Contract.Wallet + Plutus.Trace + Plutus.Trace.Effects.Assert + Plutus.Trace.Effects.ContractInstanceId + Plutus.Trace.Effects.EmulatedWalletAPI + Plutus.Trace.Effects.EmulatorControl + Plutus.Trace.Effects.RunContract + Plutus.Trace.Effects.RunContractPlayground + Plutus.Trace.Effects.Waiting + Plutus.Trace.Emulator + Plutus.Trace.Emulator.ContractInstance + Plutus.Trace.Emulator.Extract + Plutus.Trace.Emulator.System + Plutus.Trace.Emulator.Types + Plutus.Trace.Playground + Plutus.Trace.Scheduler + Plutus.Trace.Tag + Wallet + Wallet.API + Wallet.Effects + Wallet.Emulator + Wallet.Emulator.Chain + Wallet.Emulator.Error + Wallet.Emulator.Folds + Wallet.Emulator.LogMessages + Wallet.Emulator.MultiAgent + Wallet.Emulator.NodeClient + Wallet.Emulator.Stream + Wallet.Emulator.Types + Wallet.Emulator.Wallet + Wallet.Error + Wallet.Graph + Wallet.Rollup + Wallet.Rollup.Render + Wallet.Rollup.Types + Wallet.Types + + hs-source-dirs: src + build-depends: + , freer-extras + , plutus-chain-index-core + , plutus-core + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + + build-depends: + , cardano-api + , cardano-crypto + , cardano-ledger-core + + build-depends: + , aeson >=1.5.2 + , aeson-pretty + , base >=4.7 && <5 + , bytestring + , cardano-wallet-core + , containers + , cryptonite >=0.25 + , data-default + , deepseq + , directory + , filepath + , flat + , foldl + , freer-simple + , hashable + , hedgehog + , html-entities + , IntervalMap + , lens + , memory + , mmorph + , mtl + , openapi3 + , pretty + , prettyprinter >=1.1.0.1 + , profunctors + , QuickCheck + , quickcheck-dynamic + , row-types >=1.0.1.0 + , semigroupoids + , serialise + , servant + , stm + , streaming + , template-haskell + , text + , text-class + , transformers + , uniplate + , unordered-containers + , uuid + + if !(impl(ghcjs) || os(ghcjs)) + build-depends: plutus-tx-plugin + + if flag(defer-plugin-errors) + ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors + + if !((impl(ghcjs) || os(ghcjs)) || os(windows)) exposed-modules: - Data.Row.Extras - Data.Text.Extras - Data.UUID.Extras - Plutus.Contract - Plutus.Contract.Effects - Plutus.Contract.Error - Plutus.Contract.Request - Plutus.Contract.Checkpoint - Plutus.Contract.Constraints - Plutus.Contract.Logging - Plutus.Contract.Oracle - Plutus.Contract.State - Plutus.Contract.Schema - Plutus.Contract.Trace - Plutus.Contract.Trace.RequestHandler - Plutus.Contract.Resumable - Plutus.Contract.StateMachine - Plutus.Contract.StateMachine.OnChain - Plutus.Contract.StateMachine.MintingPolarity - Plutus.Contract.StateMachine.ThreadToken - Plutus.Contract.Tx - Plutus.Contract.Types - Plutus.Contract.Util - Plutus.Contract.Wallet - Plutus.Contract.Typed.Tx - Plutus.Contract.Secrets - Wallet.Emulator - Wallet.Emulator.Types - Wallet.Emulator.Chain - Wallet.Emulator.Error - Wallet.Emulator.Folds - Wallet.Emulator.LogMessages - Wallet.Emulator.NodeClient - Wallet.Emulator.MultiAgent - Wallet.Emulator.Stream - Wallet.Emulator.Wallet - Wallet.Rollup - Wallet.Rollup.Types - Wallet.Rollup.Render - Wallet - Wallet.API - Wallet.Effects - Wallet.Error - Wallet.Graph - Wallet.Types - Plutus.Trace - Plutus.Trace.Effects.Assert - Plutus.Trace.Effects.ContractInstanceId - Plutus.Trace.Effects.RunContract - Plutus.Trace.Effects.RunContractPlayground - Plutus.Trace.Effects.EmulatedWalletAPI - Plutus.Trace.Effects.EmulatorControl - Plutus.Trace.Effects.Waiting - Plutus.Trace.Emulator - Plutus.Trace.Emulator.ContractInstance - Plutus.Trace.Emulator.Extract - Plutus.Trace.Emulator.System - Plutus.Trace.Emulator.Types - Plutus.Trace.Playground - Plutus.Trace.Scheduler - Plutus.Trace.Tag - hs-source-dirs: src - build-depends: - plutus-chain-index-core -any, - plutus-core -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-script-utils -any, - plutus-tx -any, - freer-extras -any - build-depends: - cardano-api -any, - cardano-crypto -any, - cardano-ledger-core -any, + Plutus.Contract.Test + Plutus.Contract.Test.ContractModel + Plutus.Contract.Test.ContractModel.CrashTolerance + Plutus.Contract.Test.ContractModel.Internal + Plutus.Contract.Test.ContractModel.Symbolics + Plutus.Contract.Test.Coverage + Plutus.Contract.Test.Coverage.Analysis + Plutus.Contract.Test.Coverage.Analysis.Common + Plutus.Contract.Test.Coverage.Analysis.DeBruijn + Plutus.Contract.Test.Coverage.Analysis.Interpreter + Plutus.Contract.Test.Coverage.Analysis.Pretty + Plutus.Contract.Test.Coverage.Analysis.Types + Plutus.Contract.Test.Coverage.ReportCoverage + Plutus.Contract.Test.MissingLovelace + build-depends: - aeson >= 1.5.2, - aeson-pretty -any, - base >=4.7 && <5, - bytestring -any, - containers -any, - cryptonite >=0.25, - data-default -any, - deepseq -any, - directory -any, - filepath -any, - flat -any, - foldl -any, - freer-simple -any, - hashable -any, - hedgehog -any, - html-entities -any, - lens -any, - memory -any, - mmorph -any, - mtl -any, - prettyprinter >=1.1.0.1, - pretty -any, - profunctors -any, - quickcheck-dynamic -any, - row-types >= 1.0.1.0, - semigroupoids -any, - servant -any, - serialise -any, - streaming -any, - template-haskell -any, - text -any, - transformers -any, - unordered-containers -any, - uuid -any, - IntervalMap -any, - QuickCheck -any, - openapi3 -any, - cardano-wallet-core -any, - text-class -any, - uniplate -any, - stm -any - - if !(impl(ghcjs) || os(ghcjs)) - build-depends: plutus-tx-plugin -any - - if flag(defer-plugin-errors) - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors - - if !(impl(ghcjs) || os(ghcjs) || os(windows)) - exposed-modules: - Plutus.Contract.Test - Plutus.Contract.Test.Coverage - Plutus.Contract.Test.Coverage.ReportCoverage - Plutus.Contract.Test.Coverage.Analysis - Plutus.Contract.Test.Coverage.Analysis.Common - Plutus.Contract.Test.Coverage.Analysis.DeBruijn - Plutus.Contract.Test.Coverage.Analysis.Interpreter - Plutus.Contract.Test.Coverage.Analysis.Pretty - Plutus.Contract.Test.Coverage.Analysis.Types - Plutus.Contract.Test.ContractModel - Plutus.Contract.Test.ContractModel.Internal - Plutus.Contract.Test.ContractModel.Symbolics - Plutus.Contract.Test.ContractModel.CrashTolerance - Plutus.Contract.Test.MissingLovelace - build-depends: - tasty -any, - tasty-hunit -any, - tasty-golden -any, + , tasty + , tasty-golden + , tasty-hunit test-suite plutus-contract-test - -- TODO: put this back, turns out there were lots of warnings in the `plutus-emulator` tests... - --import: lang - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - type: exitcode-stdio-1.0 - main-is: Spec.hs - ghc-options: -Wall -Wnoncanonical-monad-instances - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -rtsopts - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - hs-source-dirs: test - other-modules: - Spec.Balancing - Spec.Contract - Spec.ErrorChecking - Spec.Emulator - Spec.Rows - Spec.State - Spec.ThreadToken - Spec.TimeValidity - Spec.Secrets - Spec.Plutus.Contract.Wallet - Spec.Plutus.Contract.Oracle - build-depends: - aeson -any, - base >=4.9 && <5, - bytestring -any, - cardano-api -any, - cardano-api:gen -any, - containers -any, - data-default -any, - extensible-effects -any, - freer-extras -any, - freer-simple -any, - hedgehog -any, - lens -any, - mtl -any, - plutus-chain-index-core -any, - plutus-contract -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-script-utils -any, - plutus-tx -any, - QuickCheck -any, - row-types -any, - semigroupoids -any, - tasty -any, - tasty-golden -any, - tasty-hedgehog -any, - tasty-hunit -any, - tasty-quickcheck -any, - text -any, - transformers -any, - plutus-core -any, - pretty -any, - prettyprinter -any, - utf8-string -any, - deepseq -any, - stm -any, - serialise -any, - splitmix -any - - if !(impl(ghcjs) || os(ghcjs)) - build-depends: plutus-tx-plugin -any + -- TODO: put this back, turns out there were lots of warnings in the `plutus-emulator` tests... + --import: lang + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + type: exitcode-stdio-1.0 + main-is: Spec.hs + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wredundant-constraints -Widentities + -rtsopts -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas + + hs-source-dirs: test + other-modules: + Spec.Balancing + Spec.Contract + Spec.Emulator + Spec.ErrorChecking + Spec.Plutus.Contract.Oracle + Spec.Plutus.Contract.Wallet + Spec.Rows + Spec.Secrets + Spec.State + Spec.ThreadToken + Spec.TimeValidity + + build-depends: + , aeson + , base >=4.9 && <5 + , bytestring + , cardano-api:{cardano-api, gen} + , containers + , data-default + , deepseq + , extensible-effects + , freer-extras + , freer-simple + , hedgehog + , lens + , mtl + , plutus-chain-index-core + , plutus-contract + , plutus-core + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + , pretty + , prettyprinter + , QuickCheck + , row-types + , semigroupoids + , serialise + , splitmix + , stm + , tasty + , tasty-golden + , tasty-hedgehog + , tasty-hunit + , tasty-quickcheck + , text + , transformers + , utf8-string + + if !(impl(ghcjs) || os(ghcjs)) + build-depends: plutus-tx-plugin diff --git a/plutus-example/plutus-example.cabal b/plutus-example/plutus-example.cabal index 087262bfb7..01ae0ec1ef 100644 --- a/plutus-example/plutus-example.cabal +++ b/plutus-example/plutus-example.cabal @@ -1,162 +1,155 @@ -cabal-version: 3.0 - -name: plutus-example -version: 1.33.0 -description: End to end examples of creating and executing Plutus scripts. -author: IOHK -maintainer: operations@iohk.io -license: Apache-2.0 -build-type: Simple -extra-source-files: README.md - -Flag unexpected_thunks - Description: Turn on unexpected thunks checks - Default: False +cabal-version: 3.0 +name: plutus-example +version: 1.33.0 +description: + End to end examples of creating and executing Plutus scripts. + +author: IOHK +maintainer: operations@iohk.io +license: Apache-2.0 +build-type: Simple +extra-source-files: README.md + +flag unexpected_thunks + description: Turn on unexpected thunks checks + default: False flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + default: False + manual: True common base - build-depends: base >= 4.14 && < 4.15 + build-depends: base ^>=4.14 common project-config - default-language: Haskell2010 - - default-extensions: NoImplicitPrelude - OverloadedStrings - ImportQualifiedPost - - ghc-options: -Wall - -Wcompat - -Wincomplete-record-updates - -Wincomplete-uni-patterns - -Wpartial-fields - -Wredundant-constraints - -Wunused-packages - -fobject-code - -fno-ignore-interface-pragmas - -fno-omit-interface-pragmas - - -- See Plutus Tx readme + default-language: Haskell2010 + default-extensions: + NoImplicitPrelude + ImportQualifiedPost + OverloadedStrings + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wcompat -Wincomplete-record-updates + -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints + -Wunused-packages -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas + if flag(defer-plugin-errors) - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors + ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors common maybe-Win32 if os(windows) - build-depends: Win32 + build-depends: Win32 library - import: base, project-config - , maybe-Win32 + import: + base, project-config + , maybe-Win32 if flag(unexpected_thunks) cpp-options: -DUNEXPECTED_THUNKS - hs-source-dirs: src - - exposed-modules: PlutusExample.AlwaysFails - PlutusExample.AlwaysSucceeds - PlutusExample.CustomDatumRedeemerGuess - PlutusExample.DatumRedeemerGuess - PlutusExample.MintingScript - PlutusExample.ScriptContextChecker - PlutusExample.Sum - PlutusExample.Loop - - build-depends: aeson - , bytestring - , cardano-api - , cardano-cli - , cardano-ledger-alonzo - , cardano-ledger-core - , cardano-slotting - , containers - , ouroboros-consensus - , ouroboros-network - , plutus-ledger-api - , plutus-script-utils - , plutus-tx - , plutus-tx-plugin - , serialise - , strict-containers - , transformers - , transformers-except - + hs-source-dirs: src + exposed-modules: + PlutusExample.AlwaysFails + PlutusExample.AlwaysSucceeds + PlutusExample.CustomDatumRedeemerGuess + PlutusExample.DatumRedeemerGuess + PlutusExample.Loop + PlutusExample.MintingScript + PlutusExample.ScriptContextChecker + PlutusExample.Sum + + build-depends: + , aeson + , bytestring + , cardano-api + , cardano-cli + , cardano-ledger-alonzo + , cardano-ledger-core + , cardano-slotting + , containers + , ouroboros-consensus + , ouroboros-network + , plutus-ledger-api + , plutus-script-utils + , plutus-tx + , plutus-tx-plugin + , serialise + , strict-containers + , transformers + , transformers-except executable plutus-example - import: base, project-config - hs-source-dirs: app - main-is: plutus-example.hs - ghc-options: -threaded -rtsopts "-with-rtsopts=-T" - - build-depends: cardano-api - , directory - , filepath - , plutus-example + import: base, project-config + hs-source-dirs: app + main-is: plutus-example.hs + ghc-options: -threaded -rtsopts -with-rtsopts=-T + build-depends: + , cardano-api + , directory + , filepath + , plutus-example executable create-script-context - import: base, project-config - hs-source-dirs: app - main-is: create-script-context.hs - ghc-options: -threaded -rtsopts "-with-rtsopts=-T" - - build-depends: bytestring - , cardano-api - , optparse-applicative - , plutus-example - , transformers + import: base, project-config + hs-source-dirs: app + main-is: create-script-context.hs + ghc-options: -threaded -rtsopts -with-rtsopts=-T + build-depends: + , bytestring + , cardano-api + , optparse-applicative + , plutus-example + , transformers test-suite plutus-example-test - import: base, project-config - - hs-source-dirs: test - main-is: plutus-example-test.hs - type: exitcode-stdio-1.0 - - build-depends: cardano-prelude - , aeson - , base16-bytestring - , bytestring - , cardano-api - , cardano-api:gen - , cardano-cli - , cardano-ledger-alonzo - , cardano-ledger-core - , cardano-ledger-shelley - , cardano-testnet - , containers - , directory - , filepath - , hedgehog - , hedgehog-extras - , plutus-example - , plutus-ledger-api - , tasty - , tasty-hedgehog - , text - , unordered-containers - + import: base, project-config + hs-source-dirs: test + main-is: plutus-example-test.hs + type: exitcode-stdio-1.0 + build-depends: + , aeson + , base16-bytestring + , bytestring + , cardano-api:{cardano-api, gen} + , cardano-cli + , cardano-ledger-alonzo + , cardano-ledger-core + , cardano-ledger-shelley + , cardano-prelude + , cardano-testnet + , containers + , directory + , filepath + , hedgehog + , hedgehog-extras + , plutus-example + , plutus-ledger-api + , tasty + , tasty-hedgehog + , text + , unordered-containers other-modules: - - Test.PlutusExample.Direct.ScriptContextEquality - Test.PlutusExample.Direct.CertifyingAndWithdrawingPlutus - Test.PlutusExample.Direct.ScriptContextEqualityMint - Test.PlutusExample.Direct.TxInLockingPlutus - Test.PlutusExample.Script.TxInLockingPlutus - Test.PlutusExample.SubmitApi.TxInLockingPlutus - Test.PlutusExample.Gen - Test.PlutusExample.Plutus - Test.PlutusExample.ScriptData - - ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T - - build-tool-depends: cardano-node:cardano-node - , cardano-cli:cardano-cli - , cardano-submit-api:cardano-submit-api - , plutus-example:create-script-context - + Test.PlutusExample.Direct.CertifyingAndWithdrawingPlutus + Test.PlutusExample.Direct.ScriptContextEquality + Test.PlutusExample.Direct.ScriptContextEqualityMint + Test.PlutusExample.Direct.TxInLockingPlutus + Test.PlutusExample.Gen + Test.PlutusExample.Plutus + Test.PlutusExample.Script.TxInLockingPlutus + Test.PlutusExample.ScriptData + Test.PlutusExample.SubmitApi.TxInLockingPlutus + + ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T + build-tool-depends: + , cardano-cli:cardano-cli + , cardano-node:cardano-node + , cardano-submit-api:cardano-submit-api + , plutus-example:create-script-context diff --git a/plutus-ledger-constraints/plutus-ledger-constraints.cabal b/plutus-ledger-constraints/plutus-ledger-constraints.cabal index 4700743601..75e4f19383 100644 --- a/plutus-ledger-constraints/plutus-ledger-constraints.cabal +++ b/plutus-ledger-constraints/plutus-ledger-constraints.cabal @@ -1,82 +1,93 @@ -cabal-version: 3.0 -name: plutus-ledger-constraints -version: 0.1.0.0 -license: Apache-2.0 +cabal-version: 3.0 +name: plutus-ledger-constraints +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: sjoerd.visscher@iohk.io -author: Michael Peyton Jones, Jann Mueller -synopsis: Ledger Constraints -description: - Plutus transaction constraints library -category: Language -build-type: Simple -extra-doc-files: - README.md + +maintainer: sjoerd.visscher@iohk.io +author: Michael Peyton Jones, Jann Mueller +synopsis: Ledger Constraints +description: Plutus transaction constraints library +category: Language +build-type: Simple +extra-doc-files: README.md source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable MultiParamTypeClasses FlexibleContexts - ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -Wmissing-import-lists - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + FlexibleContexts + GeneralizedNewtypeDeriving + ImportQualifiedPost + MultiParamTypeClasses + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities -Wmissing-import-lists + -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas library - import: lang - hs-source-dirs: src - default-language: Haskell2010 - exposed-modules: - Ledger.Constraints - Ledger.Constraints.OffChain - Ledger.Constraints.OnChain - Ledger.Constraints.TxConstraints + import: lang + hs-source-dirs: src + default-language: Haskell2010 + exposed-modules: + Ledger.Constraints + Ledger.Constraints.OffChain + Ledger.Constraints.OnChain + Ledger.Constraints.TxConstraints - build-depends: - base >=4.9 && <5, - aeson -any, - containers -any, - data-default -any, - lens -any, - mtl -any, - openapi3 -any, - prettyprinter -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-script-utils -any, - plutus-tx -any, - transformers -any, + build-depends: + , aeson + , base >=4.9 && <5 + , containers + , data-default + , lens + , mtl + , openapi3 + , plutus-ledger + , plutus-ledger-api + , plutus-script-utils + , plutus-tx + , prettyprinter + , transformers test-suite plutus-ledger-constraints-test - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - build-depends: - base >=4.9 && <5, - bytestring -any, - containers -any, - data-default -any, - hedgehog -any, - lens -any, - mtl -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-script-utils -any, - plutus-tx -any, - plutus-tx-plugin -any, - tasty -any, - tasty-hedgehog -any, - template-haskell -any, + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + build-depends: + , base >=4.9 && <5 + , bytestring + , containers + , data-default + , hedgehog + , lens + , mtl + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + , plutus-tx-plugin + , tasty + , tasty-hedgehog + , template-haskell diff --git a/plutus-ledger/plutus-ledger.cabal b/plutus-ledger/plutus-ledger.cabal index e8caa1382d..724d76a296 100644 --- a/plutus-ledger/plutus-ledger.cabal +++ b/plutus-ledger/plutus-ledger.cabal @@ -1,158 +1,166 @@ -cabal-version: 3.0 -name: plutus-ledger -version: 0.1.0.0 -license: Apache-2.0 +cabal-version: 3.0 +name: plutus-ledger +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: michael.peyton-jones@iohk.io -author: Michael Peyton Jones, Jann Mueller -synopsis: Wallet API -description: - Plutus ledger library -category: Language -build-type: Simple + +maintainer: michael.peyton-jones@iohk.io +author: Michael Peyton Jones, Jann Mueller +synopsis: Wallet API +description: Plutus ledger library +category: Language +build-type: Simple extra-doc-files: README.md source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable MultiParamTypeClasses FlexibleContexts - ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + FlexibleContexts + GeneralizedNewtypeDeriving + ImportQualifiedPost + MultiParamTypeClasses + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities -fobject-code + -fno-ignore-interface-pragmas -fno-omit-interface-pragmas flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. + + default: False + manual: True library - import: lang - hs-source-dirs: src - default-language: Haskell2010 - exposed-modules: - Data.Time.Units.Extra - Ledger - Ledger.Address - Ledger.AddressMap - Ledger.Blockchain - Ledger.CardanoWallet - Ledger.Crypto - Ledger.Fee - Ledger.Generators - Ledger.Index - Ledger.Index.Internal - Ledger.Orphans - Ledger.Params - Ledger.TimeSlot - Ledger.Tokens - Ledger.Tx - Ledger.Tx.CardanoAPI - Ledger.Typed.Tx - Ledger.Typed.Scripts - Ledger.Typed.Scripts.Validators - Ledger.Typed.TypeUtils - Ledger.Value - Ledger.Validation - reexported-modules: - Data.Aeson.Extras, - Data.Either.Extras, - Plutus.V1.Ledger.Ada as Ledger.Ada, - Plutus.V1.Ledger.Bytes as Ledger.Bytes, - Plutus.V1.Ledger.Credential as Ledger.Credential, - Plutus.V1.Ledger.DCert as Ledger.DCert, - Plutus.V1.Ledger.Interval as Ledger.Interval, - Plutus.V1.Ledger.Slot as Ledger.Slot, - Plutus.V1.Ledger.Scripts as Ledger.Scripts, - Plutus.V1.Ledger.TxId as Ledger.TxId, - Plutus.V1.Ledger.Time as Ledger.Time, - -- The rest of the plutus-ledger-api modules are reexported from within - -- the Haskell modules and not in the current cabal file. - -- For example: Plutus.V1.Ledger.Address is reexported by Ledger.Address - other-modules: - Ledger.Tx.CardanoAPITemp + import: lang + hs-source-dirs: src + default-language: Haskell2010 + exposed-modules: + Data.Time.Units.Extra + Ledger + Ledger.Address + Ledger.AddressMap + Ledger.Blockchain + Ledger.CardanoWallet + Ledger.Crypto + Ledger.Fee + Ledger.Generators + Ledger.Index + Ledger.Index.Internal + Ledger.Orphans + Ledger.Params + Ledger.TimeSlot + Ledger.Tokens + Ledger.Tx + Ledger.Tx.CardanoAPI + Ledger.Typed.Scripts + Ledger.Typed.Scripts.Validators + Ledger.Typed.Tx + Ledger.Typed.TypeUtils + Ledger.Validation + Ledger.Value + + reexported-modules: + Data.Aeson.Extras, + Data.Either.Extras, + Plutus.V1.Ledger.Ada as Ledger.Ada, + Plutus.V1.Ledger.Bytes as Ledger.Bytes, + Plutus.V1.Ledger.Credential as Ledger.Credential, + Plutus.V1.Ledger.DCert as Ledger.DCert, + Plutus.V1.Ledger.Interval as Ledger.Interval, + Plutus.V1.Ledger.Slot as Ledger.Slot, + Plutus.V1.Ledger.Scripts as Ledger.Scripts, + Plutus.V1.Ledger.TxId as Ledger.TxId, + Plutus.V1.Ledger.Time as Ledger.Time, - build-depends: - base >=4.9 && <5, - aeson -any, - array -any, - bytestring -any, - cardano-api -any, - cardano-api:gen -any, - cardano-crypto -any, - cardano-crypto-class -any, - cardano-ledger-alonzo -any, - cardano-ledger-byron -any, - cardano-ledger-core -any, - cardano-ledger-shelley, - cardano-ledger-shelley-ma -any, - cardano-slotting -any, - deepseq -any, - cborg -any, - containers -any, - cryptonite >=0.25, - data-default -any, - hashable -any, - hedgehog -any, - iohk-monitoring -any, - plutus-core -any, - plutus-ledger-api -any, - memory -any, - mtl -any, - ouroboros-consensus-shelley -any, - prettyprinter -any, - plutus-tx -any, - plutus-script-utils -any, - serialise -any, - scientific -any, - strict-containers -any, - template-haskell -any, - text -any, - time -any, - time-units -any, - transformers -any, - lens -any, - http-api-data -any, - servant -any, - deepseq -any, - openapi3 -any, - freer-extras, + -- The rest of the plutus-ledger-api modules are reexported from within + -- the Haskell modules and not in the current cabal file. + -- For example: Plutus.V1.Ledger.Address is reexported by Ledger.Address + other-modules: Ledger.Tx.CardanoAPITemp + build-depends: + , aeson + , array + , base >=4.9 && <5 + , bytestring + , cardano-api:{cardano-api, gen} + , cardano-crypto + , cardano-crypto-class + , cardano-ledger-alonzo + , cardano-ledger-byron + , cardano-ledger-core + , cardano-ledger-shelley + , cardano-ledger-shelley-ma + , cardano-slotting + , cborg + , containers + , cryptonite >=0.25 + , data-default + , deepseq + , freer-extras + , hashable + , hedgehog + , http-api-data + , iohk-monitoring + , lens + , memory + , mtl + , openapi3 + , ouroboros-consensus-shelley + , plutus-core + , plutus-ledger-api + , plutus-script-utils + , plutus-tx + , prettyprinter + , scientific + , serialise + , servant + , strict-containers + , template-haskell + , text + , time + , time-units + , transformers - ghc-options: -fprint-potential-instances + ghc-options: -fprint-potential-instances - if flag(defer-plugin-errors) - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors + if flag(defer-plugin-errors) + ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors test-suite plutus-ledger-test - import: lang - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - other-modules: - Ledger.Tx.CardanoAPISpec - build-depends: - aeson -any, - base >=4.9 && <5, - bytestring -any, - cardano-api -any, - cardano-api:gen -any, - containers -any, - hedgehog -any, - plutus-ledger -any, - plutus-tx -any, - tasty -any, - tasty-hedgehog -any, - tasty-hunit -any, + import: lang + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + other-modules: Ledger.Tx.CardanoAPISpec + build-depends: + , aeson + , base >=4.9 && <5 + , bytestring + , cardano-api:{cardano-api, gen} + , containers + , hedgehog + , plutus-ledger + , plutus-tx + , tasty + , tasty-hedgehog + , tasty-hunit diff --git a/plutus-pab-executables/plutus-pab-executables.cabal b/plutus-pab-executables/plutus-pab-executables.cabal index a250e9e8a3..cd7fbf6e79 100644 --- a/plutus-pab-executables/plutus-pab-executables.cabal +++ b/plutus-pab-executables/plutus-pab-executables.cabal @@ -3,489 +3,466 @@ name: plutus-pab-executables version: 0.1.0.0 license: Apache-2.0 license-files: - LICENSE - NOTICE + LICENSE + NOTICE maintainer: jann.mueller@iohk.io author: Jann Müller -homepage: https://github.com/iohk/plutus#readme -bug-reports: https://github.com/iohk/plutus/issues +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues description: - Please see the README on GitHub at + Please see the README on GitHub at build-type: Simple source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + default: False + manual: True common lang - default-language: Haskell2010 - default-extensions: - DeriveFoldable - DeriveFunctor - DeriveGeneric - DeriveLift - DeriveTraversable - ExplicitForAll - GeneralizedNewtypeDeriving - ImportQualifiedPost - ScopedTypeVariables - StandaloneDeriving - - ghc-options: - -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns - -Wincomplete-record-updates -Wredundant-constraints -Widentities - -fobject-code -fno-ignore-interface-pragmas - -fno-omit-interface-pragmas - -Wunused-packages - - -- See Plutus Tx readme - if flag(defer-plugin-errors) - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wredundant-constraints -Widentities + -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas -Wunused-packages + + if flag(defer-plugin-errors) + ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors library - import: lang - exposed-modules: - Plutus.PAB.Run.PSGenerator - hs-source-dirs: src - build-depends: - , freer-extras - , playground-common - , plutus-contract - , plutus-pab - - build-depends: - base >=4.7 && <5, - lens -any, - playground-common -any, - purescript-bridge -any, - servant-purescript -any, - text -any, + import: lang + exposed-modules: Plutus.PAB.Run.PSGenerator + hs-source-dirs: src + build-depends: + , freer-extras + , playground-common + , plutus-contract + , plutus-pab + + build-depends: + , base >=4.7 && <5 + , lens + , playground-common + , purescript-bridge + , servant-purescript + , text executable plutus-pab-setup - main-is: Main.hs - hs-source-dirs: app - other-modules: - CommandParser - - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: - -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints -O0 - -Wunused-packages - - build-depends: - aeson -any, - base >=4.9 && <5, - iohk-monitoring -any, - monad-logger -any, - optparse-applicative -any, - plutus-contract -any, - plutus-pab -any, + main-is: Main.hs + hs-source-dirs: app + other-modules: CommandParser + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints -O0 + -Wunused-packages + + build-depends: + , aeson + , base >=4.9 && <5 + , iohk-monitoring + , monad-logger + , optparse-applicative + , plutus-contract + , plutus-pab -- TODO: This needs to be moved to plutus-use-cases once plutus-pab doesn't -- depend on plutus-use-cases anymore. executable plutus-pab-examples - main-is: Main.hs - hs-source-dirs: examples - other-modules: - ContractExample.AtomicSwap - ContractExample.IntegrationTest - ContractExample.PayToWallet - ContractExample.WaitForTx - ContractExample - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: - -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints -O0 - -Wunused-packages - - build-depends: - , aeson - , base >=4.9 && <5 - , containers - , data-default - , freer-simple - , lens - , playground-common - , plutus-contract - , plutus-ledger - , plutus-ledger-constraints - , plutus-pab - , plutus-pab-executables - , plutus-use-cases - , prettyprinter - , purescript-bridge - , row-types - , text - , openapi3 + main-is: Main.hs + hs-source-dirs: examples + other-modules: + ContractExample + ContractExample.AtomicSwap + ContractExample.IntegrationTest + ContractExample.PayToWallet + ContractExample.WaitForTx + + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints -O0 + -Wunused-packages + + build-depends: + , aeson + , base >=4.9 && <5 + , containers + , data-default + , freer-simple + , lens + , openapi3 + , playground-common + , plutus-contract + , plutus-ledger + , plutus-ledger-constraints + , plutus-pab + , plutus-pab-executables + , plutus-use-cases + , prettyprinter + , purescript-bridge + , row-types + , text -- TODO: This needs to be moved to plutus-use-cases once plutus-pab doesn't -- depend on plutus-use-cases anymore. executable plutus-uniswap - main-is: Main.hs - hs-source-dirs: examples/uniswap - other-modules: - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: - -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints -O0 - -Wunused-packages - - build-depends: - , aeson - , base >=4.9 && <5 - , containers - , data-default -any - , freer-simple - , plutus-contract - , plutus-ledger-api - , plutus-pab - , plutus-use-cases - , prettyprinter - , text - , openapi3 + main-is: Main.hs + hs-source-dirs: examples/uniswap + other-modules: + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints -O0 + -Wunused-packages + + build-depends: + , aeson + , base >=4.9 && <5 + , containers + , data-default + , freer-simple + , openapi3 + , plutus-contract + , plutus-ledger-api + , plutus-pab + , plutus-use-cases + , prettyprinter + , text -- TODO: This needs to be moved to plutus-use-cases once plutus-pab doesn't -- depend on plutus-use-cases anymore. executable plutus-pab-local-cluster - main-is: Main.hs - hs-source-dirs: - local-cluster - examples - other-modules: - ContractExample - ContractExample.AtomicSwap - ContractExample.IntegrationTest - ContractExample.PayToWallet - ContractExample.WaitForTx - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: - -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints -O0 - -Wunused-packages - - build-depends: - , playground-common - , plutus-contract - , plutus-ledger - , plutus-ledger-api - , plutus-ledger-constraints - , plutus-pab - , plutus-pab-executables - , plutus-use-cases - - build-depends: - , aeson - , base >=4.9 && <5 - , containers - , text - , lens - , prettyprinter - , freer-simple - , data-default - , row-types - , purescript-bridge - , openapi3 + main-is: Main.hs + hs-source-dirs: local-cluster examples + other-modules: + ContractExample + ContractExample.AtomicSwap + ContractExample.IntegrationTest + ContractExample.PayToWallet + ContractExample.WaitForTx + + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints -O0 + -Wunused-packages + + build-depends: + , playground-common + , plutus-contract + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-pab + , plutus-pab-executables + , plutus-use-cases + + build-depends: + , aeson + , base >=4.9 && <5 + , containers + , data-default + , freer-simple + , lens + , openapi3 + , prettyprinter + , purescript-bridge + , row-types + , text executable plutus-pab-test-psgenerator - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: - -Wunused-packages - hs-source-dirs: - test-psgenerator - test/full - examples - - main-is: TestPSGenerator.hs - other-modules: - ContractExample.AtomicSwap - ContractExample.IntegrationTest - ContractExample.PayToWallet - Plutus.PAB.Effects.Contract.ContractTest - Plutus.PAB.Simulator.Test - - -- TODO plutus-use-cases dep needs to be removed - build-depends: - aeson -any, - aeson-pretty -any, - base >=4.9 && <5, - bytestring -any, - containers -any, - data-default -any, - freer-extras -any, - freer-simple -any, - lens -any, - mtl -any, - plutus-contract -any, - plutus-pab, - plutus-use-cases -any, - plutus-ledger -any, - plutus-ledger-constraints -any, - text -any, - prettyprinter -any, - row-types -any, - playground-common -any, - servant-purescript -any, - purescript-bridge -any, - filepath -any + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: -Wunused-packages + hs-source-dirs: test-psgenerator test/full examples + main-is: TestPSGenerator.hs + other-modules: + ContractExample.AtomicSwap + ContractExample.IntegrationTest + ContractExample.PayToWallet + Plutus.PAB.Effects.Contract.ContractTest + Plutus.PAB.Simulator.Test + + -- TODO plutus-use-cases dep needs to be removed + build-depends: + , aeson + , aeson-pretty + , base >=4.9 && <5 + , bytestring + , containers + , data-default + , filepath + , freer-extras + , freer-simple + , lens + , mtl + , playground-common + , plutus-contract + , plutus-ledger + , plutus-ledger-constraints + , plutus-pab + , plutus-use-cases + , prettyprinter + , purescript-bridge + , row-types + , servant-purescript + , text test-suite plutus-pab-test-full - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: - -Wunused-packages - hs-source-dirs: - test/full - examples - - type: exitcode-stdio-1.0 - main-is: Spec.hs - other-modules: - ContractExample - ContractExample.WaitForTx - ContractExample.AtomicSwap - ContractExample.IntegrationTest - ContractExample.PayToWallet - Plutus.PAB.CoreSpec - Plutus.PAB.CliSpec - Plutus.PAB.Effects.Contract.BuiltinSpec - Plutus.PAB.Effects.Contract.ContractTest - Plutus.PAB.Simulator.Test - - -- TODO plutus-use-cases dep needs to be removed - build-depends: - aeson -any, - base >=4.9 && <5, - containers -any, - data-default -any, - freer-extras -any, - freer-simple -any, - http-client -any, - lens -any, - mtl -any, - plutus-chain-index-core -any, - plutus-contract -any, - plutus-pab, - plutus-pab-executables, - plutus-use-cases -any, - plutus-ledger -any, - plutus-ledger-constraints -any, - quickcheck-instances -any, - servant-client -any, - tasty -any, - tasty-hunit -any, - stm -any, - text -any, - prettyprinter -any, - row-types -any, - plutus-tx -any, - playground-common -any, - yaml -any, - iohk-monitoring -any, - sqlite-simple -any, - servant-server -any, - purescript-bridge -any, - async -any, - servant-client -any, - uuid -any, - openapi3, + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: -Wunused-packages + hs-source-dirs: test/full examples + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + ContractExample + ContractExample.AtomicSwap + ContractExample.IntegrationTest + ContractExample.PayToWallet + ContractExample.WaitForTx + Plutus.PAB.CliSpec + Plutus.PAB.CoreSpec + Plutus.PAB.Effects.Contract.BuiltinSpec + Plutus.PAB.Effects.Contract.ContractTest + Plutus.PAB.Simulator.Test + + -- TODO plutus-use-cases dep needs to be removed + build-depends: + , aeson + , async + , base >=4.9 && <5 + , containers + , data-default + , freer-extras + , freer-simple + , http-client + , iohk-monitoring + , lens + , mtl + , openapi3 + , playground-common + , plutus-chain-index-core + , plutus-contract + , plutus-ledger + , plutus-ledger-constraints + , plutus-pab + , plutus-pab-executables + , plutus-tx + , plutus-use-cases + , prettyprinter + , purescript-bridge + , quickcheck-instances + , row-types + , servant-client + , servant-server + , sqlite-simple + , stm + , tasty + , tasty-hunit + , text + , uuid + , yaml test-suite plutus-pab-test-full-long-running - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: - -Wunused-packages - hs-source-dirs: - test/full - examples - - type: exitcode-stdio-1.0 - main-is: SpecLongRunning.hs - other-modules: - ContractExample - ContractExample.WaitForTx - ContractExample.AtomicSwap - ContractExample.IntegrationTest - ContractExample.PayToWallet - Plutus.PAB.CliSpec - Plutus.PAB.Effects.Contract.ContractTest - Plutus.PAB.Simulator.Test - - -- TODO plutus-use-cases dep needs to be removed - build-depends: - aeson -any, - base >=4.9 && <5, - containers -any, - data-default -any, - freer-extras -any, - freer-simple -any, - http-client -any, - lens -any, - mtl -any, - plutus-contract -any, - plutus-chain-index-core -any, - plutus-pab, - plutus-pab-executables -any, - plutus-use-cases -any, - plutus-ledger -any, - plutus-ledger-constraints -any, - servant-client -any, - sqlite-simple -any, - tasty -any, - tasty-hunit -any, - text -any, - prettyprinter -any, - row-types -any, - playground-common -any, - yaml -any, - iohk-monitoring -any, - servant-server -any, - purescript-bridge -any, - async -any, - servant-client -any, - openapi3 -any, + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: -Wunused-packages + hs-source-dirs: test/full examples + type: exitcode-stdio-1.0 + main-is: SpecLongRunning.hs + other-modules: + ContractExample + ContractExample.AtomicSwap + ContractExample.IntegrationTest + ContractExample.PayToWallet + ContractExample.WaitForTx + Plutus.PAB.CliSpec + Plutus.PAB.Effects.Contract.ContractTest + Plutus.PAB.Simulator.Test + + -- TODO plutus-use-cases dep needs to be removed + build-depends: + , aeson + , async + , base >=4.9 && <5 + , containers + , data-default + , freer-extras + , freer-simple + , http-client + , iohk-monitoring + , lens + , mtl + , openapi3 + , playground-common + , plutus-chain-index-core + , plutus-contract + , plutus-ledger + , plutus-ledger-constraints + , plutus-pab + , plutus-pab-executables + , plutus-use-cases + , prettyprinter + , purescript-bridge + , row-types + , servant-client + , servant-server + , sqlite-simple + , tasty + , tasty-hunit + , text + , yaml executable tx-inject - import: lang - main-is: Main.hs - hs-source-dirs: tx-inject - other-modules: - TxInject.RandomTx - default-language: Haskell2010 - build-depends: - base >=4.9 && <5, - data-default -any, - plutus-pab, - containers -any, - clock -any, - lens -any, - mwc-random -any, - optparse-applicative -any, - plutus-contract -any, - plutus-ledger -any, - pretty-simple -any, - rate-limit -any, - signal -any, - stm -any, - text -any, - time-units -any, - yaml -any, - hedgehog -any, - primitive -any + import: lang + main-is: Main.hs + hs-source-dirs: tx-inject + other-modules: TxInject.RandomTx + default-language: Haskell2010 + build-depends: + , base >=4.9 && <5 + , clock + , containers + , data-default + , hedgehog + , lens + , mwc-random + , optparse-applicative + , plutus-contract + , plutus-ledger + , plutus-pab + , pretty-simple + , primitive + , rate-limit + , signal + , stm + , text + , time-units + , yaml executable sync-client - import: lang - main-is: Main.hs - hs-source-dirs: sync-client - default-language: Haskell2010 - build-depends: - base >=4.9 && <5, - cardano-api -any, - cardano-slotting -any, - contra-tracer -any, - either -any, - optparse-applicative -any, - plutus-chain-index-core, - plutus-ledger, - text + import: lang + main-is: Main.hs + hs-source-dirs: sync-client + default-language: Haskell2010 + build-depends: + , base >=4.9 && <5 + , cardano-api + , cardano-slotting + , contra-tracer + , either + , optparse-applicative + , plutus-chain-index-core + , plutus-ledger + , text executable plutus-pab-nami-demo - import: lang - main-is: Main.hs + import: lang + main-is: Main.hs hs-source-dirs: demo/pab-nami/pab/app - other-modules: - DemoContract - ghc-options: - -threaded + other-modules: DemoContract + ghc-options: -threaded build-depends: - aeson -any, - base >= 4.9 && < 5, - openapi3 -any, - plutus-contract -any, - plutus-pab -any, - plutus-pab-executables -any, - playground-common -any, - prettyprinter -any, - purescript-bridge -any, - plutus-ledger -any, - plutus-ledger-constraints -any, + , aeson + , base >=4.9 && <5 + , openapi3 + , playground-common + , plutus-contract + , plutus-ledger + , plutus-ledger-constraints + , plutus-pab + , plutus-pab-executables + , prettyprinter + , purescript-bridge executable plutus-pab-nami-demo-generator - import: lang - main-is: Generator.hs + import: lang + main-is: Generator.hs hs-source-dirs: demo/pab-nami/pab/app - other-modules: - DemoContract - ghc-options: - -threaded + other-modules: DemoContract + ghc-options: -threaded build-depends: - aeson -any, - base >= 4.9 && < 5, - openapi3 -any, - optparse-applicative -any, - plutus-contract -any, - plutus-pab -any, - plutus-pab-executables -any, - playground-common -any, - prettyprinter -any, - purescript-bridge -any, - plutus-ledger -any, - plutus-ledger-constraints -any, + , aeson + , base >=4.9 && <5 + , openapi3 + , optparse-applicative + , playground-common + , plutus-contract + , plutus-ledger + , plutus-ledger-constraints + , plutus-pab + , plutus-pab-executables + , prettyprinter + , purescript-bridge executable pab-cli - import: lang - main-is: Main.hs + import: lang + main-is: Main.hs hs-source-dirs: pab-cli other-modules: - App - CommandParser - Types - ghc-options: - -threaded - -Wmissing-import-lists - -Wunused-packages + App + CommandParser + Types + + ghc-options: -threaded -Wmissing-import-lists -Wunused-packages build-depends: - plutus-chain-index-core -any, - plutus-ledger -any, - plutus-pab -any, + , plutus-chain-index-core + , plutus-ledger + , plutus-pab + build-depends: - cardano-api -any, - cardano-ledger-shelley -any, - ouroboros-consensus-shelley -any, + , cardano-api + , cardano-ledger-shelley + , ouroboros-consensus-shelley + build-depends: - aeson -any, - async -any, - base >= 4.9 && < 5, - bytestring -any, - cardano-api -any, - data-default -any, - directory -any, - docopt -any, - exceptions -any, - filepath -any, - freer-simple -any, - process -any, - req -any, - servant-client -any, - text -any, - time -any, - yaml -any, - MissingH -any, + , aeson + , async + , base >=4.9 && <5 + , bytestring + , cardano-api + , data-default + , directory + , docopt + , exceptions + , filepath + , freer-simple + , MissingH + , process + , req + , servant-client + , text + , time + , yaml diff --git a/plutus-pab/plutus-pab.cabal b/plutus-pab/plutus-pab.cabal index d5011deab0..ddd01fdf3b 100644 --- a/plutus-pab/plutus-pab.cabal +++ b/plutus-pab/plutus-pab.cabal @@ -3,237 +3,241 @@ name: plutus-pab version: 0.1.0.0 license: Apache-2.0 license-files: - LICENSE - NOTICE + LICENSE + NOTICE maintainer: jann.mueller@iohk.io author: Jann Müller -homepage: https://github.com/iohk/plutus#readme -bug-reports: https://github.com/iohk/plutus/issues +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues description: - Please see the README on GitHub at + Please see the README on GitHub at build-type: Simple source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + default: False + manual: True common lang - default-language: Haskell2010 - default-extensions: - DeriveFoldable - DeriveFunctor - DeriveGeneric - DeriveLift - DeriveTraversable - ExplicitForAll - GeneralizedNewtypeDeriving - ImportQualifiedPost - ScopedTypeVariables - StandaloneDeriving - ghc-options: - -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns - -Wincomplete-record-updates -Wredundant-constraints -Widentities - -fobject-code -fno-ignore-interface-pragmas - -fno-omit-interface-pragmas + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + ScopedTypeVariables + StandaloneDeriving - -- See Plutus Tx readme - if flag(defer-plugin-errors) - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wredundant-constraints -Widentities + -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas + + if flag(defer-plugin-errors) + ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors library - import: lang - ghc-options: -Wunused-packages - exposed-modules: - Cardano.Api.NetworkId.Extra - Cardano.BM.Data.Tracer.Extras - Cardano.Chain - Cardano.ChainIndex.ChainIndex - Cardano.ChainIndex.Server - Cardano.ChainIndex.Types - Cardano.Node.API - Cardano.Node.Client - Cardano.Node.Mock - Cardano.Node.Params - Cardano.Node.Server - Cardano.Node.Types - Cardano.Protocol.Socket.Mock.Client - Cardano.Protocol.Socket.Mock.Server - Cardano.Wallet.LocalClient - Cardano.Wallet.RemoteClient - Cardano.Wallet.Types - Cardano.Wallet.Mock.API - Cardano.Wallet.Mock.Client - Cardano.Wallet.Mock.Handlers - Cardano.Wallet.Mock.Server - Cardano.Wallet.Mock.Types - Control.Concurrent.Availability - Control.Concurrent.STM.Extras - Control.Concurrent.STM.Extras.Stream - Control.Monad.Freer.Delay - Plutus.PAB.App - Plutus.PAB.Arbitrary - Plutus.PAB.Core - Plutus.PAB.Core.ContractInstance - Plutus.PAB.Core.ContractInstance.BlockchainEnv - Plutus.PAB.Core.ContractInstance.RequestHandlers - Plutus.PAB.Core.ContractInstance.STM - Plutus.PAB.Db.Beam - Plutus.PAB.Db.Schema - Plutus.PAB.Db.Beam.ContractStore - Plutus.PAB.Db.Memory.ContractStore - Plutus.PAB.Effects.Contract - Plutus.PAB.Effects.Contract.Builtin - Plutus.PAB.Effects.TimeEffect - Plutus.PAB.Effects.UUID - Plutus.PAB.Events - Plutus.PAB.Events.Contract - Plutus.PAB.Events.ContractInstanceState - Plutus.PAB.Instances - Plutus.PAB.LocalCluster.Run - Plutus.PAB.Monitoring.Config - Plutus.PAB.Monitoring.Monitoring - Plutus.PAB.Monitoring.PABLogMsg - Plutus.PAB.Run - Plutus.PAB.Run.Cli - Plutus.PAB.Run.Command - Plutus.PAB.Run.CommandParser - Plutus.PAB.Simulator - Plutus.PAB.Timeout - Plutus.PAB.Types - Plutus.PAB.Webserver.API - Plutus.PAB.Webserver.Client - Plutus.PAB.Webserver.Handler - Plutus.PAB.Webserver.Server - Plutus.PAB.Webserver.Types - Plutus.PAB.Webserver.WebSocket - other-modules: Servant.Extra - hs-source-dirs: src - build-depends: - , freer-extras - , playground-common - , plutus-chain-index - , plutus-chain-index-core - , plutus-contract - , plutus-ledger - , plutus-ledger-api - , plutus-ledger-constraints - , plutus-tx - , plutus-tx-plugin - build-depends: - QuickCheck -any, - aeson -any, - aeson-pretty -any, - async -any, - base >=4.7 && <5, - beam-core -any, - beam-migrate -any, - beam-sqlite -any, - bytestring -any, - cardano-addresses -any, - cardano-api -any, - cardano-slotting -any, - cardano-wallet -any, - cardano-wallet-cli -any, - cardano-wallet-core -any, - cardano-wallet-core-integration -any, - cardano-wallet-launcher -any, - cardano-ledger-core -any, - containers -any, - contra-tracer -any, - cryptonite -any, - data-default -any, - either -any, - directory -any, - exceptions -any, - filepath -any, - freer-simple -any, - generic-arbitrary -any, - http-client -any, - http-client-tls -any, - iohk-monitoring -any, - lens -any, - lobemo-backend-ekg -any, - memory -any, - monad-logger -any, - mtl -any, - network-mux -any, - openapi3 -any, - optparse-applicative -any, - ouroboros-network -any, - ouroboros-network-framework -any, - prettyprinter >=1.1.0.1, - quickcheck-instances -any, - random -any, - resource-pool -any, - row-types -any, - servant -any, - servant-client -any, - servant-openapi3, - servant-options -any, - servant-server -any, - servant-swagger-ui, - servant-websockets -any, - sqlite-simple -any, - stm -any, - tagged -any, - text -any, - text-class -any, - time -any, - time-units -any, - transformers -any, - unordered-containers -any, - uuid -any, - wai -any, - wai-cors -any, - warp -any, - websockets -any, - Win32-network -any, - yaml -any, + import: lang + ghc-options: -Wunused-packages + exposed-modules: + Cardano.Api.NetworkId.Extra + Cardano.BM.Data.Tracer.Extras + Cardano.Chain + Cardano.ChainIndex.ChainIndex + Cardano.ChainIndex.Server + Cardano.ChainIndex.Types + Cardano.Node.API + Cardano.Node.Client + Cardano.Node.Mock + Cardano.Node.Params + Cardano.Node.Server + Cardano.Node.Types + Cardano.Protocol.Socket.Mock.Client + Cardano.Protocol.Socket.Mock.Server + Cardano.Wallet.LocalClient + Cardano.Wallet.Mock.API + Cardano.Wallet.Mock.Client + Cardano.Wallet.Mock.Handlers + Cardano.Wallet.Mock.Server + Cardano.Wallet.Mock.Types + Cardano.Wallet.RemoteClient + Cardano.Wallet.Types + Control.Concurrent.Availability + Control.Concurrent.STM.Extras + Control.Concurrent.STM.Extras.Stream + Control.Monad.Freer.Delay + Plutus.PAB.App + Plutus.PAB.Arbitrary + Plutus.PAB.Core + Plutus.PAB.Core.ContractInstance + Plutus.PAB.Core.ContractInstance.BlockchainEnv + Plutus.PAB.Core.ContractInstance.RequestHandlers + Plutus.PAB.Core.ContractInstance.STM + Plutus.PAB.Db.Beam + Plutus.PAB.Db.Beam.ContractStore + Plutus.PAB.Db.Memory.ContractStore + Plutus.PAB.Db.Schema + Plutus.PAB.Effects.Contract + Plutus.PAB.Effects.Contract.Builtin + Plutus.PAB.Effects.TimeEffect + Plutus.PAB.Effects.UUID + Plutus.PAB.Events + Plutus.PAB.Events.Contract + Plutus.PAB.Events.ContractInstanceState + Plutus.PAB.Instances + Plutus.PAB.LocalCluster.Run + Plutus.PAB.Monitoring.Config + Plutus.PAB.Monitoring.Monitoring + Plutus.PAB.Monitoring.PABLogMsg + Plutus.PAB.Run + Plutus.PAB.Run.Cli + Plutus.PAB.Run.Command + Plutus.PAB.Run.CommandParser + Plutus.PAB.Simulator + Plutus.PAB.Timeout + Plutus.PAB.Types + Plutus.PAB.Webserver.API + Plutus.PAB.Webserver.Client + Plutus.PAB.Webserver.Handler + Plutus.PAB.Webserver.Server + Plutus.PAB.Webserver.Types + Plutus.PAB.Webserver.WebSocket + + other-modules: Servant.Extra + hs-source-dirs: src + build-depends: + , freer-extras + , playground-common + , plutus-chain-index + , plutus-chain-index-core + , plutus-contract + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-tx + , plutus-tx-plugin + + build-depends: + , aeson + , aeson-pretty + , async + , base >=4.7 && <5 + , beam-core + , beam-migrate + , beam-sqlite + , bytestring + , cardano-addresses + , cardano-api + , cardano-ledger-core + , cardano-slotting + , cardano-wallet + , cardano-wallet-cli + , cardano-wallet-core + , cardano-wallet-core-integration + , cardano-wallet-launcher + , containers + , contra-tracer + , cryptonite + , data-default + , directory + , either + , exceptions + , filepath + , freer-simple + , generic-arbitrary + , http-client + , http-client-tls + , iohk-monitoring + , lens + , lobemo-backend-ekg + , memory + , monad-logger + , mtl + , network-mux + , openapi3 + , optparse-applicative + , ouroboros-network + , ouroboros-network-framework + , prettyprinter >=1.1.0.1 + , QuickCheck + , quickcheck-instances + , random + , resource-pool + , row-types + , servant + , servant-client + , servant-openapi3 + , servant-options + , servant-server + , servant-swagger-ui + , servant-websockets + , sqlite-simple + , stm + , tagged + , text + , text-class + , time + , time-units + , transformers + , unordered-containers + , uuid + , wai + , wai-cors + , warp + , websockets + , Win32-network + , yaml test-suite plutus-pab-test-light - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -Wunused-packages - hs-source-dirs: test/light - type: exitcode-stdio-1.0 - main-is: Spec.hs - other-modules: - Cardano.Api.NetworkId.ExtraSpec - Cardano.Wallet.RemoteClientSpec - Cardano.Wallet.ServerSpec - Control.Concurrent.STM.ExtrasSpec - Plutus.PAB.ArbitrarySpec - build-depends: - QuickCheck -any, - aeson -any, - base >=4.9 && <5, - bytestring -any, - cardano-api -any, - cardano-api:gen -any, - data-default -any, - freer-simple -any, - hedgehog -any, - plutus-contract -any, - plutus-pab, - plutus-ledger -any, - plutus-ledger-constraints -any, - plutus-tx -any, - quickcheck-instances -any, - tasty -any, - tasty-hunit -any, - smallcheck -any, - hedgehog-quickcheck -any, - tasty-hedgehog -any, - tasty-smallcheck -any, - tasty-quickcheck -any, - stm -any, - async -any, + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: -Wunused-packages + hs-source-dirs: test/light + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Cardano.Api.NetworkId.ExtraSpec + Cardano.Wallet.RemoteClientSpec + Cardano.Wallet.ServerSpec + Control.Concurrent.STM.ExtrasSpec + Plutus.PAB.ArbitrarySpec + + build-depends: + , aeson + , async + , base >=4.9 && <5 + , bytestring + , cardano-api:{cardano-api, gen} + , data-default + , freer-simple + , hedgehog + , hedgehog-quickcheck + , plutus-contract + , plutus-ledger + , plutus-ledger-constraints + , plutus-pab + , plutus-tx + , QuickCheck + , quickcheck-instances + , smallcheck + , stm + , tasty + , tasty-hedgehog + , tasty-hunit + , tasty-quickcheck + , tasty-smallcheck diff --git a/plutus-playground-server/plutus-playground-server.cabal b/plutus-playground-server/plutus-playground-server.cabal index 96f39d96cb..40e89554b3 100644 --- a/plutus-playground-server/plutus-playground-server.cabal +++ b/plutus-playground-server/plutus-playground-server.cabal @@ -1,251 +1,265 @@ cabal-version: 2.0 -name: plutus-playground-server -version: 0.1.0.0 -license: Apache-2.0 +name: plutus-playground-server +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: kris.jenkins@tweag.io -author: Kris Jenkins -homepage: https://github.com/input-output-hk/plutus-apps#readme -bug-reports: https://github.com/input-output-hk/plutus-apps/issues + +maintainer: kris.jenkins@tweag.io +author: Kris Jenkins +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues description: - Please see the README on GitHub at -build-type: Simple + Please see the README on GitHub at + +build-type: Simple data-files: - usecases/Crowdfunding.hs - usecases/ErrorHandling.hs - usecases/Game.hs - usecases/Vesting.hs - usecases/Starter.hs - test/gists1.json + test/gists1.json + usecases/Crowdfunding.hs + usecases/ErrorHandling.hs + usecases/Game.hs + usecases/Starter.hs + usecases/Vesting.hs source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. + + default: False + manual: True library - exposed-modules: - Playground.Server - Playground.Interpreter - Playground.Usecases - Crowdfunding - CrowdfundingSimulations - ErrorHandling - ErrorHandlingSimulations - Game - GameSimulations - HelloWorld - HelloWorldSimulations - SimulationUtils - Starter - StarterSimulations - Vesting - VestingSimulations - hs-source-dirs: src - , usecases - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -Wall -Wcompat -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - build-depends: - aeson -any, - base >=4.7 && <5, - bytestring -any, - data-default -any, - containers -any, - exceptions -any, - file-embed -any, - http-client -any, - http-conduit -any, - jwt -any, - lens -any, - monad-logger -any, - mtl -any, - newtype-generics -any, - playground-common -any, - plutus-contract -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-script-utils -any, - plutus-tx -any, - regex-compat -any, - plutus-contract -any, - row-types -any, - servant >= 0.16, - servant-client -any, - servant-client-core -any, - servant-server -any, - template-haskell -any, - text -any, - time-units -any, - transformers -any, - wai-cors -any, - web-ghc -any - - if !(impl(ghcjs) || os(ghcjs)) - build-depends: plutus-tx-plugin -any + exposed-modules: + Crowdfunding + CrowdfundingSimulations + ErrorHandling + ErrorHandlingSimulations + Game + GameSimulations + HelloWorld + HelloWorldSimulations + Playground.Interpreter + Playground.Server + Playground.Usecases + SimulationUtils + Starter + StarterSimulations + Vesting + VestingSimulations + + hs-source-dirs: src usecases + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wcompat -Wunused-packages -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wno-missing-import-lists + -Wredundant-constraints -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas + + build-depends: + aeson + , base >=4.7 && <5 + , bytestring + , containers + , data-default + , exceptions + , file-embed + , http-client + , http-conduit + , jwt + , lens + , monad-logger + , mtl + , newtype-generics + , playground-common + , plutus-contract + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + , regex-compat + , row-types + , servant >=0.16 + , servant-client + , servant-client-core + , servant-server + , template-haskell + , text + , time-units + , transformers + , wai-cors + , web-ghc + + if !(impl(ghcjs) || os(ghcjs)) + build-depends: plutus-tx-plugin library plutus-playground-usecases - hs-source-dirs: usecases - other-modules: - Crowdfunding - CrowdfundingSimulations - ErrorHandling - ErrorHandlingSimulations - Game - GameSimulations - HelloWorld - HelloWorldSimulations - SimulationUtils - Starter - StarterSimulations - Vesting - VestingSimulations - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -Wall -Wcompat -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints - -Wno-missing-signatures -Wno-missing-import-lists - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - - build-depends: - aeson -any, - base >=4.7 && <5, - data-default -any, - lens -any, - bytestring -any, - containers -any, - mtl -any, - playground-common -any, - plutus-contract -any, - plutus-tx -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-script-utils -any, - row-types -any, - text -any, - transformers -any - - if !(impl(ghcjs) || os(ghcjs)) - build-depends: plutus-tx-plugin -any - - if flag(defer-plugin-errors) - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors + hs-source-dirs: usecases + other-modules: + Crowdfunding + CrowdfundingSimulations + ErrorHandling + ErrorHandlingSimulations + Game + GameSimulations + HelloWorld + HelloWorldSimulations + SimulationUtils + Starter + StarterSimulations + Vesting + VestingSimulations + + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wcompat -Wunused-packages -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wredundant-constraints + -Wno-missing-signatures -Wno-missing-import-lists -fobject-code + -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + + build-depends: + aeson + , base >=4.7 && <5 + , bytestring + , containers + , data-default + , lens + , mtl + , playground-common + , plutus-contract + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + , row-types + , text + , transformers + + if !(impl(ghcjs) || os(ghcjs)) + build-depends: plutus-tx-plugin + + if flag(defer-plugin-errors) + ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors executable plutus-playground-server - main-is: Main.hs - hs-source-dirs: app - , usecases - other-modules: - Webserver - Types - PSGenerator - Crowdfunding - CrowdfundingSimulations - ErrorHandling - ErrorHandlingSimulations - Game - GameSimulations - HelloWorld - HelloWorldSimulations - SimulationUtils - Starter - StarterSimulations - Vesting - VestingSimulations - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints -O0 - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - build-depends: - aeson -any, - aeson-pretty -any, - base >=4.7 && <5, - bytestring -any, - containers -any, - data-default -any, - exceptions -any, - data-default-class -any, - filepath -any, - freer-extras -any, - playground-common -any, - lens -any, - monad-logger -any, - mtl -any, - optparse-applicative -any, - plutus-tx -any, - plutus-playground-server -any, - plutus-playground-usecases -any, - purescript-bridge -any, - servant -any, - servant-purescript -any, - servant-server -any, - text -any, - time-units -any, - transformers -any, - plutus-contract -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-script-utils -any, - row-types -any, - warp -any, - web-ghc -any - - if !(impl(ghcjs) || os(ghcjs)) - build-depends: plutus-tx-plugin -any + main-is: Main.hs + hs-source-dirs: app usecases + other-modules: + Crowdfunding + CrowdfundingSimulations + ErrorHandling + ErrorHandlingSimulations + Game + GameSimulations + HelloWorld + HelloWorldSimulations + PSGenerator + SimulationUtils + Starter + StarterSimulations + Types + Vesting + VestingSimulations + Webserver + + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints -O0 -fobject-code + -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + + build-depends: + aeson + , aeson-pretty + , base >=4.7 && <5 + , bytestring + , containers + , data-default + , data-default-class + , exceptions + , filepath + , freer-extras + , lens + , monad-logger + , mtl + , optparse-applicative + , playground-common + , plutus-contract + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-playground-server + , plutus-playground-usecases + , plutus-script-utils + , plutus-tx + , purescript-bridge + , row-types + , servant + , servant-purescript + , servant-server + , text + , time-units + , transformers + , warp + , web-ghc + + if !(impl(ghcjs) || os(ghcjs)) + build-depends: plutus-tx-plugin test-suite plutus-playground-server-test - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - GistSpec - Paths_plutus_playground_server - Playground.InterpreterSpec - Playground.UsecasesSpec - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - -- We don't want "-threaded" and friends here as there are many tests with heavy GHC compilation. - -- This is a hack as one can fine-tune test cases better (like sequential tests) with in-code tasty dependencies. - -- See #4085. - ghc-options: -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints - -fprint-potential-instances - build-depends: - aeson -any, - base >=4.7 && <5, - bytestring -any, - tasty -any, - tasty-hunit -any, - newtype-generics -any, - playground-common -any, - mtl -any, - plutus-playground-server -any, - plutus-ledger -any, - plutus-playground-usecases -any, - plutus-contract -any, - tasty -any, - tasty-hunit -any, - text -any, - time-units -any, - transformers -any, - web-ghc -any + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + other-modules: + GistSpec + Paths_plutus_playground_server + Playground.InterpreterSpec + Playground.UsecasesSpec + + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + + -- We don't want "-threaded" and friends here as there are many tests with heavy GHC compilation. + -- This is a hack as one can fine-tune test cases better (like sequential tests) with in-code tasty dependencies. + -- See #4085. + ghc-options: + -Wall -Wcompat -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wno-missing-import-lists + -Wredundant-constraints -fprint-potential-instances + + build-depends: + aeson + , base >=4.7 && <5 + , bytestring + , mtl + , newtype-generics + , playground-common + , plutus-contract + , plutus-ledger + , plutus-playground-server + , plutus-playground-usecases + , tasty + , tasty-hunit + , text + , time-units + , transformers + , web-ghc diff --git a/plutus-script-utils/plutus-script-utils.cabal b/plutus-script-utils/plutus-script-utils.cabal index 2ac2984e8c..6b875482b0 100644 --- a/plutus-script-utils/plutus-script-utils.cabal +++ b/plutus-script-utils/plutus-script-utils.cabal @@ -1,79 +1,92 @@ -cabal-version: 3.0 -name: plutus-script-utils -version: 0.1.0.0 -license: Apache-2.0 +cabal-version: 3.0 +name: plutus-script-utils +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: konstantinos.lambrou@iohk.io -author: Konstantinos Lambrou-Latreille -homepage: https://github.com/input-output-hk/plutus-apps#readme -bug-reports: https://github.com/input-output-hk/plutus-apps/issues -synopsis: Helper/utility functions for writing Plutus scripts. -description: - Helper/utility functions for writing Plutus scripts. -category: Language -build-type: Simple + +maintainer: konstantinos.lambrou@iohk.io +author: Konstantinos Lambrou-Latreille +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues +synopsis: Helper/utility functions for writing Plutus scripts. +description: Helper/utility functions for writing Plutus scripts. +category: Language +build-type: Simple extra-doc-files: README.adoc source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable MultiParamTypeClasses FlexibleContexts - ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -Wmissing-import-lists - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + FlexibleContexts + GeneralizedNewtypeDeriving + ImportQualifiedPost + MultiParamTypeClasses + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities -Wmissing-import-lists + -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. + + default: False + manual: True library - import: lang - hs-source-dirs: src - default-language: Haskell2010 - exposed-modules: - Plutus.Script.Utils.V1.Generators - Plutus.Script.Utils.V1.Scripts - Plutus.Script.Utils.V1.Typed.Scripts - Plutus.Script.Utils.V1.Typed.Scripts.MonetaryPolicies - Plutus.Script.Utils.V1.Typed.Scripts.StakeValidators - Plutus.Script.Utils.V1.Typed.Scripts.Validators + import: lang + hs-source-dirs: src + default-language: Haskell2010 + exposed-modules: + Plutus.Script.Utils.V1.Generators + Plutus.Script.Utils.V1.Scripts + Plutus.Script.Utils.V1.Typed.Scripts + Plutus.Script.Utils.V1.Typed.Scripts.MonetaryPolicies + Plutus.Script.Utils.V1.Typed.Scripts.StakeValidators + Plutus.Script.Utils.V1.Typed.Scripts.Validators - build-depends: - base >=4.9 && <5, - cardano-api >=1.34, - cardano-ledger-alonzo -any, - bytestring -any, - plutus-core -any, - plutus-ledger-api -any, - plutus-tx -any, - plutus-tx-plugin -any, - serialise -any, + build-depends: + , base >=4.9 && <5 + , bytestring + , cardano-api >=1.34 + , cardano-ledger-alonzo + , plutus-core + , plutus-ledger-api + , plutus-tx + , plutus-tx-plugin + , serialise - ghc-options: -fprint-potential-instances + ghc-options: -fprint-potential-instances - if flag(defer-plugin-errors) - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors + if flag(defer-plugin-errors) + ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors test-suite plutus-ledger-test - import: lang - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - build-depends: - base >=4.9 && <5, - tasty -any, + import: lang + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + build-depends: + , base >=4.9 && <5 + , tasty diff --git a/plutus-streaming/plutus-streaming.cabal b/plutus-streaming/plutus-streaming.cabal index 52ac8d8922..cb6bce145d 100644 --- a/plutus-streaming/plutus-streaming.cabal +++ b/plutus-streaming/plutus-streaming.cabal @@ -6,88 +6,93 @@ maintainer: andrea.bedini@iohk.io extra-source-files: CHANGELOG.md common lang - default-language: Haskell2010 - default-extensions: - DeriveFoldable - DeriveFunctor - DeriveGeneric - DeriveLift - DeriveTraversable - ExplicitForAll - GeneralizedNewtypeDeriving - ImportQualifiedPost - LambdaCase - NamedFieldPuns - ScopedTypeVariables - StandaloneDeriving - ghc-options: - -Wall - -Widentities - -Wincomplete-record-updates - -Wincomplete-uni-patterns - -Wmissing-import-lists - -Wnoncanonical-monad-instances - -Wredundant-constraints - -Wunused-packages + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + LambdaCase + NamedFieldPuns + ScopedTypeVariables + StandaloneDeriving + + ghc-options: + -Wall -Widentities -Wincomplete-record-updates + -Wincomplete-uni-patterns -Wmissing-import-lists + -Wnoncanonical-monad-instances -Wredundant-constraints + -Wunused-packages library - import: lang - hs-source-dirs: src - exposed-modules: - Plutus.Streaming - build-depends: - base >=4.9 && <5, - async, - cardano-api, - ouroboros-network, - stm, - streaming, + import: lang + hs-source-dirs: src + exposed-modules: Plutus.Streaming + build-depends: + , async + , base >=4.9 && <5 + , cardano-api + , ouroboros-network + , stm + , streaming executable plutus-streaming-example-1 - import: lang - hs-source-dirs: examples - main-is: Example1.hs - other-modules: Common, Orphans - build-depends: - plutus-streaming, - base >=4.9 && <5, - aeson, - base16-bytestring, - bytestring, - cardano-api, - optparse-applicative, - streaming, - text + import: lang + hs-source-dirs: examples + main-is: Example1.hs + other-modules: + Common + Orphans + + build-depends: + , aeson + , base >=4.9 && <5 + , base16-bytestring + , bytestring + , cardano-api + , optparse-applicative + , plutus-streaming + , streaming + , text executable plutus-streaming-example-2 - import: lang - hs-source-dirs: examples - main-is: Example2.hs - other-modules: Common, Orphans - build-depends: - plutus-streaming, - base >=4.9 && <5, - aeson, - base16-bytestring, - bytestring, - cardano-api, - optparse-applicative, - plutus-ledger, - plutus-script-utils, - streaming, + import: lang + hs-source-dirs: examples + main-is: Example2.hs + other-modules: + Common + Orphans + + build-depends: + , aeson + , base >=4.9 && <5 + , base16-bytestring + , bytestring + , cardano-api + , optparse-applicative + , plutus-ledger + , plutus-script-utils + , plutus-streaming + , streaming executable plutus-streaming-example-3 - import: lang - hs-source-dirs: examples - main-is: Example3.hs - other-modules: Common, Orphans - build-depends: - plutus-streaming, - base >=4.9 && <5, - aeson, - base16-bytestring, - bytestring, - cardano-api, - optparse-applicative, - plutus-chain-index-core, - streaming, + import: lang + hs-source-dirs: examples + main-is: Example3.hs + other-modules: + Common + Orphans + + build-depends: + , aeson + , base >=4.9 && <5 + , base16-bytestring + , bytestring + , cardano-api + , optparse-applicative + , plutus-chain-index-core + , plutus-streaming + , streaming diff --git a/plutus-tx-constraints/plutus-tx-constraints.cabal b/plutus-tx-constraints/plutus-tx-constraints.cabal index c4e47ee8e7..8d77de85cd 100644 --- a/plutus-tx-constraints/plutus-tx-constraints.cabal +++ b/plutus-tx-constraints/plutus-tx-constraints.cabal @@ -1,80 +1,92 @@ -cabal-version: 3.0 -name: plutus-tx-constraints -version: 0.1.0.0 -license: Apache-2.0 +cabal-version: 3.0 +name: plutus-tx-constraints +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: sjoerd.visscher@iohk.io -author: Sjoerd Visscher -synopsis: Plutus Transaction Constraints -description: - Plutus transaction constraints library -category: Language -build-type: Simple + +maintainer: sjoerd.visscher@iohk.io +author: Sjoerd Visscher +synopsis: Plutus Transaction Constraints +description: Plutus transaction constraints library +category: Language +build-type: Simple extra-doc-files: README.md source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable MultiParamTypeClasses FlexibleContexts - ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -Wmissing-import-lists - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + FlexibleContexts + GeneralizedNewtypeDeriving + ImportQualifiedPost + MultiParamTypeClasses + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities -Wmissing-import-lists + -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas library - import: lang - hs-source-dirs: src - default-language: Haskell2010 - exposed-modules: - Ledger.Tx.Constraints - Ledger.Tx.Constraints.OffChain + import: lang + hs-source-dirs: src + default-language: Haskell2010 + exposed-modules: + Ledger.Tx.Constraints + Ledger.Tx.Constraints.OffChain - build-depends: - base >=4.9 && <5, - aeson -any, - cardano-api -any, - containers -any, - lens -any, - mtl -any, - openapi3 -any, - prettyprinter -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-tx -any, - transformers -any, + build-depends: + , aeson + , base >=4.9 && <5 + , cardano-api + , containers + , lens + , mtl + , openapi3 + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-tx + , prettyprinter + , transformers test-suite plutus-tx-constraints-test - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - build-depends: - base >=4.9 && <5, - cardano-api -any, - bytestring -any, - containers -any, - data-default -any, - hedgehog -any, - lens -any, - mtl -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-tx-constraints -any, - plutus-script-utils -any, - plutus-tx -any, - plutus-tx-plugin -any, - tasty -any, - tasty-hedgehog -any, - template-haskell -any, + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + build-depends: + , base >=4.9 && <5 + , bytestring + , cardano-api + , containers + , data-default + , hedgehog + , lens + , mtl + , plutus-ledger + , plutus-ledger-api + , plutus-script-utils + , plutus-tx + , plutus-tx-constraints + , plutus-tx-plugin + , tasty + , tasty-hedgehog + , template-haskell diff --git a/plutus-use-cases/plutus-use-cases.cabal b/plutus-use-cases/plutus-use-cases.cabal index 4b9047c6de..d07a99cbaf 100644 --- a/plutus-use-cases/plutus-use-cases.cabal +++ b/plutus-use-cases/plutus-use-cases.cabal @@ -1,242 +1,266 @@ -cabal-version: 2.0 -name: plutus-use-cases -version: 0.1.0.0 -license: Apache-2.0 -license-file: LICENSE NOTICE -maintainer: jann.mueller@iohk.io -author: Manuel M T Chakravarty, Jann Müller -stability: experimental -synopsis: Collection of smart contracts to develop the plutus/wallet interface +cabal-version: 2.0 +name: plutus-use-cases +version: 0.1.0.0 +license: Apache-2.0 +license-file: LICENSE NOTICE +maintainer: jann.mueller@iohk.io +author: Manuel M T Chakravarty, Jann Müller +stability: experimental +synopsis: + Collection of smart contracts to develop the plutus/wallet interface + description: - Collection of smart contracts to develop the plutus/wallet interface. -category: Language -build-type: Simple + Collection of smart contracts to develop the plutus/wallet interface. + +category: Language +build-type: Simple extra-doc-files: README.md source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. + + default: False + manual: True library - exposed-modules: - Plutus.Contracts - Plutus.Contracts.Auction - Plutus.Contracts.SealedBidAuction - Plutus.Contracts.TokenAccount - Plutus.Contracts.Crowdfunding - Plutus.Contracts.Currency - Plutus.Contracts.ErrorHandling - Plutus.Contracts.Escrow - Plutus.Contracts.SimpleEscrow - Plutus.Contracts.Tutorial.Escrow - Plutus.Contracts.Tutorial.EscrowStrict - Plutus.Contracts.Future - Plutus.Contracts.Game - Plutus.Contracts.GameStateMachine - Plutus.Contracts.GameStateMachine.Coverage - Plutus.Contracts.Governance - Plutus.Contracts.MultiSig - Plutus.Contracts.MultiSigStateMachine - Plutus.Contracts.PingPong - Plutus.Contracts.Prism - Plutus.Contracts.Prism.Credential - Plutus.Contracts.Prism.STO - Plutus.Contracts.Prism.Mirror - Plutus.Contracts.Prism.StateMachine - Plutus.Contracts.Prism.Unlock - Plutus.Contracts.PubKey - Plutus.Contracts.Stablecoin - Plutus.Contracts.Swap - Plutus.Contracts.Uniswap - Plutus.Contracts.Uniswap.OnChain - Plutus.Contracts.Uniswap.OffChain - Plutus.Contracts.Uniswap.Pool - Plutus.Contracts.Uniswap.Trace - Plutus.Contracts.Uniswap.Types - Plutus.Contracts.Vesting - hs-source-dirs: src - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable MultiParamTypeClasses ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - build-depends: - base -any, - aeson -any, - bytestring -any, - containers -any, - plutus-core -any, - plutus-tx -any, - plutus-tx-plugin -any, - plutus-contract -any, - playground-common -any, - plutus-ledger -any, - plutus-ledger-api -any, - plutus-ledger-constraints -any, - plutus-script-utils -any, - template-haskell -any, - lens -any, - text -any, - prettyprinter -any, - hashable -any, - freer-simple -any, - streaming -any, - semigroups -any, - openapi3 -any, - freer-simple -any - - if flag(defer-plugin-errors) - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors + exposed-modules: + Plutus.Contracts + Plutus.Contracts.Auction + Plutus.Contracts.Crowdfunding + Plutus.Contracts.Currency + Plutus.Contracts.ErrorHandling + Plutus.Contracts.Escrow + Plutus.Contracts.Future + Plutus.Contracts.Game + Plutus.Contracts.GameStateMachine + Plutus.Contracts.GameStateMachine.Coverage + Plutus.Contracts.Governance + Plutus.Contracts.MultiSig + Plutus.Contracts.MultiSigStateMachine + Plutus.Contracts.PingPong + Plutus.Contracts.Prism + Plutus.Contracts.Prism.Credential + Plutus.Contracts.Prism.Mirror + Plutus.Contracts.Prism.StateMachine + Plutus.Contracts.Prism.STO + Plutus.Contracts.Prism.Unlock + Plutus.Contracts.PubKey + Plutus.Contracts.SealedBidAuction + Plutus.Contracts.SimpleEscrow + Plutus.Contracts.Stablecoin + Plutus.Contracts.Swap + Plutus.Contracts.TokenAccount + Plutus.Contracts.Tutorial.Escrow + Plutus.Contracts.Tutorial.EscrowStrict + Plutus.Contracts.Uniswap + Plutus.Contracts.Uniswap.OffChain + Plutus.Contracts.Uniswap.OnChain + Plutus.Contracts.Uniswap.Pool + Plutus.Contracts.Uniswap.Trace + Plutus.Contracts.Uniswap.Types + Plutus.Contracts.Vesting + + hs-source-dirs: src + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + MultiParamTypeClasses + ScopedTypeVariables + StandaloneDeriving + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities -fobject-code + -fno-ignore-interface-pragmas -fno-omit-interface-pragmas + + build-depends: + aeson + , base + , bytestring + , containers + , freer-simple + , hashable + , lens + , openapi3 + , playground-common + , plutus-contract + , plutus-core + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + , plutus-tx-plugin + , prettyprinter + , semigroups + , streaming + , template-haskell + , text + + if flag(defer-plugin-errors) + ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors test-suite plutus-use-cases-test - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - Spec.Auction - Spec.SealedBidAuction - Spec.Crowdfunding - Spec.Currency - Spec.ErrorHandling - Spec.Escrow - Spec.Escrow.Endpoints - Spec.SimpleEscrow - Spec.Tutorial.Escrow - Spec.Tutorial.Escrow1 - Spec.Tutorial.Escrow2 - Spec.Tutorial.Escrow3 - Spec.Tutorial.Escrow4 - Spec.Tutorial.Escrow5 - Spec.Tutorial.Escrow6 - Spec.Future - Spec.Game - Spec.GameStateMachine - Spec.Governance - Spec.MultiSig - Spec.MultiSigStateMachine - Spec.PingPong - Spec.PubKey - Spec.Prism - Spec.Rollup - Spec.Stablecoin - Spec.Uniswap - Spec.Uniswap.Endpoints - Spec.TokenAccount - Spec.Vesting - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -rtsopts - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - build-depends: - plutus-tx -any, - plutus-contract -any, - plutus-contract-certification -any, - plutus-ledger -any, - plutus-ledger-api, - plutus-ledger-constraints -any, - plutus-script-utils -any, - plutus-use-cases -any, - playground-common -any - build-depends: - base >=4.9 && <5, - bytestring -any, - containers -any, - data-default -any, - freer-extras -any, - prettyprinter -any, - tasty -any, - tasty-hunit -any, - tasty-hedgehog >=0.2.0.0, - tasty-golden -any, - tasty-quickcheck -any, - text -any, - lens -any, - mtl -any, - QuickCheck -any, - freer-simple -any, - foldl -any, - streaming -any - - if !(impl(ghcjs) || os(ghcjs)) - build-depends: plutus-tx-plugin -any + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + other-modules: + Spec.Auction + Spec.Crowdfunding + Spec.Currency + Spec.ErrorHandling + Spec.Escrow + Spec.Escrow.Endpoints + Spec.Future + Spec.Game + Spec.GameStateMachine + Spec.Governance + Spec.MultiSig + Spec.MultiSigStateMachine + Spec.PingPong + Spec.Prism + Spec.PubKey + Spec.Rollup + Spec.SealedBidAuction + Spec.SimpleEscrow + Spec.Stablecoin + Spec.TokenAccount + Spec.Tutorial.Escrow + Spec.Tutorial.Escrow1 + Spec.Tutorial.Escrow2 + Spec.Tutorial.Escrow3 + Spec.Tutorial.Escrow4 + Spec.Tutorial.Escrow5 + Spec.Tutorial.Escrow6 + Spec.Uniswap + Spec.Uniswap.Endpoints + Spec.Vesting + + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wredundant-constraints -Widentities + -rtsopts -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas + + build-depends: + playground-common + , plutus-contract + , plutus-contract-certification + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + , plutus-use-cases + + build-depends: + base >=4.9 && <5 + , bytestring + , containers + , data-default + , foldl + , freer-extras + , freer-simple + , lens + , mtl + , prettyprinter + , QuickCheck + , streaming + , tasty + , tasty-golden + , tasty-hedgehog >=0.2.0.0 + , tasty-hunit + , tasty-quickcheck + , text + + if !(impl(ghcjs) || os(ghcjs)) + build-depends: plutus-tx-plugin -- runs emulator traces from plutus-use-cases-tests and -- writes all applied validator scripts to a folder executable plutus-use-cases-scripts - main-is: Main.hs - hs-source-dirs: - scripts - test - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - other-modules: - Spec.Auction - Spec.Crowdfunding - Spec.Currency - Spec.ErrorHandling - Spec.Escrow - Spec.Escrow.Endpoints - Spec.SimpleEscrow - Spec.Future - Spec.Game - Spec.GameStateMachine - Spec.Governance - Spec.MultiSig - Spec.MultiSigStateMachine - Spec.PingPong - Spec.PubKey - Spec.Prism - Spec.Rollup - Spec.Stablecoin - Spec.TokenAccount - Spec.Vesting - ghc-options: -Wall -Wnoncanonical-monad-instances - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -rtsopts - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - build-depends: - base >= 4.9 && <5, - bytestring -any, - containers -any, - data-default -any, - freer-extras -any, - prettyprinter -any, - QuickCheck -any, - tasty -any, - tasty-hunit -any, - tasty-golden -any, - tasty-quickcheck -any, - text -any, - lens -any, - mtl -any, - freer-simple -any, - foldl -any, - streaming -any, - plutus-ledger-api -any, - plutus-tx -any, - plutus-contract -any, - plutus-ledger -any, - plutus-ledger-constraints -any, - plutus-use-cases -any, - plutus-contract-certification -any, - plutus-script-utils -any, - optparse-applicative -any, - cardano-api -any - - if !(impl(ghcjs) || os(ghcjs)) - build-depends: plutus-tx-plugin -any + main-is: Main.hs + hs-source-dirs: scripts test + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + other-modules: + Spec.Auction + Spec.Crowdfunding + Spec.Currency + Spec.ErrorHandling + Spec.Escrow + Spec.Escrow.Endpoints + Spec.Future + Spec.Game + Spec.GameStateMachine + Spec.Governance + Spec.MultiSig + Spec.MultiSigStateMachine + Spec.PingPong + Spec.Prism + Spec.PubKey + Spec.Rollup + Spec.SimpleEscrow + Spec.Stablecoin + Spec.TokenAccount + Spec.Vesting + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wredundant-constraints -Widentities + -rtsopts -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas + + build-depends: + base >=4.9 && <5 + , bytestring + , cardano-api + , containers + , data-default + , foldl + , freer-extras + , freer-simple + , lens + , mtl + , optparse-applicative + , plutus-contract + , plutus-contract-certification + , plutus-ledger + , plutus-ledger-api + , plutus-ledger-constraints + , plutus-script-utils + , plutus-tx + , plutus-use-cases + , prettyprinter + , QuickCheck + , streaming + , tasty + , tasty-golden + , tasty-hunit + , tasty-quickcheck + , text + + if !(impl(ghcjs) || os(ghcjs)) + build-depends: plutus-tx-plugin diff --git a/quickcheck-dynamic/quickcheck-dynamic.cabal b/quickcheck-dynamic/quickcheck-dynamic.cabal index 7c98a9edb5..916e999196 100644 --- a/quickcheck-dynamic/quickcheck-dynamic.cabal +++ b/quickcheck-dynamic/quickcheck-dynamic.cabal @@ -1,63 +1,79 @@ -cabal-version: 2.2 -name: quickcheck-dynamic -version: 0.1.0.0 -license: Apache-2.0 +cabal-version: 2.2 +name: quickcheck-dynamic +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: ulf.norell@quviq.com -author: Ulf Norell -homepage: https://github.com/iohk/plutus#readme -bug-reports: https://github.com/iohk/plutus/issues + +maintainer: ulf.norell@quviq.com +author: Ulf Norell +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues description: - Please see the README on GitHub at -build-type: Simple + Please see the README on GitHub at + +build-type: Simple extra-doc-files: README.md source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables - DeriveGeneric StandaloneDeriving DeriveLift - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable ImportQualifiedPost - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities + default-language: Haskell2010 + default-extensions: + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + ExplicitForAll + GeneralizedNewtypeDeriving + ImportQualifiedPost + ScopedTypeVariables + StandaloneDeriving + + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities library - import: lang - hs-source-dirs: src - exposed-modules: - Test.QuickCheck.DynamicLogic - Test.QuickCheck.DynamicLogic.CanGenerate - Test.QuickCheck.DynamicLogic.Monad - Test.QuickCheck.DynamicLogic.Quantify - Test.QuickCheck.DynamicLogic.SmartShrinking - Test.QuickCheck.DynamicLogic.Utils - Test.QuickCheck.StateModel - build-depends: - QuickCheck -any, - base >=4.7 && <5, - random -any, + import: lang + hs-source-dirs: src + exposed-modules: + Test.QuickCheck.DynamicLogic + Test.QuickCheck.DynamicLogic.CanGenerate + Test.QuickCheck.DynamicLogic.Monad + Test.QuickCheck.DynamicLogic.Quantify + Test.QuickCheck.DynamicLogic.SmartShrinking + Test.QuickCheck.DynamicLogic.Utils + Test.QuickCheck.StateModel + + build-depends: + , base >=4.7 && <5 + , QuickCheck + , random test-suite quickcheck-dynamic-test - import: lang - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - Spec.DynamicLogic.Registry - Spec.DynamicLogic.RegistryModel - ghc-options: -rtsopts - -- See Plutus Tx readme - -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - build-depends: - QuickCheck -any, - base >=4.7 && <5, - quickcheck-dynamic -any, - tasty -any, - tasty-quickcheck -any, + import: lang + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + other-modules: + Spec.DynamicLogic.Registry + Spec.DynamicLogic.RegistryModel + + -- See Plutus Tx readme for why we need the following flags: + -- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas + ghc-options: + -rtsopts -fobject-code -fno-ignore-interface-pragmas + -fno-omit-interface-pragmas + + build-depends: + , base >=4.7 && <5 + , QuickCheck + , quickcheck-dynamic + , tasty + , tasty-quickcheck diff --git a/shell.nix b/shell.nix index 19ad02265d..77e71d79c7 100644 --- a/shell.nix +++ b/shell.nix @@ -7,7 +7,7 @@ let inherit (packages) pkgs plutus-apps plutus-playground pab-nami-demo docs webCommon; inherit (pkgs) stdenv lib utillinux python3 nixpkgs-fmt; - inherit (plutus-apps) haskell stylish-haskell sphinxcontrib-haddock sphinx-markdown-tables sphinxemoji nix-pre-commit-hooks; + inherit (plutus-apps) haskell stylish-haskell sphinxcontrib-haddock sphinx-markdown-tables sphinxemoji nix-pre-commit-hooks cabal-fmt; # Feed cardano-wallet, cardano-cli & cardano-node to our shell. # This is stable as it doesn't mix dependencies with this code-base; @@ -52,6 +52,7 @@ let stylish-haskell = stylish-haskell; nixpkgs-fmt = nixpkgs-fmt; shellcheck = pkgs.shellcheck; + cabal-fmt = cabal-fmt; }; hooks = { purs-tidy-hook = { @@ -69,6 +70,7 @@ let # maintain excludes here *and* in `./.ignore` and *keep them in sync*. excludes = [ ".*nix/pkgs/haskell/materialized.*/.*" ".*/spago-packages.nix$" ]; }; + cabal-fmt.enable = true; shellcheck.enable = true; png-optimization = { enable = true; @@ -93,6 +95,7 @@ let jq nixFlakesAlias nixpkgs-fmt + cabal-fmt nodejs plantuml shellcheck @@ -113,6 +116,7 @@ let docs.build-and-serve-docs fixPngOptimization fix-purs-tidy + fixCabalFmt fixStylishHaskell haskell-language-server haskell-language-server-wrapper diff --git a/web-ghc/web-ghc.cabal b/web-ghc/web-ghc.cabal index 0187dee061..efbe9d7713 100644 --- a/web-ghc/web-ghc.cabal +++ b/web-ghc/web-ghc.cabal @@ -1,91 +1,100 @@ cabal-version: 2.0 -name: web-ghc -version: 0.1.0.0 -license: Apache-2.0 +name: web-ghc +version: 0.1.0.0 +license: Apache-2.0 license-files: LICENSE NOTICE -maintainer: david.smith@tweag.io -author: David Smith -homepage: https://github.com/iohk/plutus#readme -bug-reports: https://github.com/iohk/plutus/issues + +maintainer: david.smith@tweag.io +author: David Smith +homepage: https://github.com/input-output-hk/plutus-apps#readme +bug-reports: https://github.com/input-output-hk/plutus-apps/issues description: - Please see the README on GitHub at -build-type: Simple + Please see the README on GitHub at + +build-type: Simple data-files: source-repository head - type: git - location: https://github.com/input-output-hk/plutus-apps + type: git + location: https://github.com/input-output-hk/plutus-apps flag defer-plugin-errors - description: - Defer errors from the plugin, useful for things like Haddock that can't handle it. - default: False - manual: True + description: + Defer errors from the plugin, useful for things like Haddock that can't handle it. + + default: False + manual: True library - exposed-modules: - Interpreter - Webghc.Server - Webghc.Client - hs-source-dirs: src - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -Wall -Wcompat -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints - build-depends: - base >=4.7 && <5, - aeson -any, - exceptions, - filepath, - mtl, - newtype-generics, - playground-common, - servant-server, - servant-client, - temporary, - text, - time-units + exposed-modules: + Interpreter + Webghc.Client + Webghc.Server + + hs-source-dirs: src + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: + -Wall -Wcompat -Wunused-packages -Wincomplete-uni-patterns + -Wincomplete-record-updates -Wno-missing-import-lists + -Wredundant-constraints + + build-depends: + aeson + , base >=4.7 && <5 + , exceptions + , filepath + , mtl + , newtype-generics + , playground-common + , servant-client + , servant-server + , temporary + , text + , time-units executable web-ghc-server - main-is: Main.hs - hs-source-dirs: app - other-modules: - Webserver - default-language: Haskell2010 - default-extensions: ImportQualifiedPost - ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints -O0 - -Wunused-packages - build-depends: - base >=4.7 && <5, - data-default-class, - monad-logger, - optparse-applicative, - playground-common, - prometheus, - servant-server, - text, - time-units, - wai-cors, - wai-extra, - wai, - warp, - web-ghc + main-is: Main.hs + hs-source-dirs: app + other-modules: Webserver + default-language: Haskell2010 + default-extensions: ImportQualifiedPost + ghc-options: + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints -O0 + -Wunused-packages + + build-depends: + base >=4.7 && <5 + , data-default-class + , monad-logger + , optparse-applicative + , playground-common + , prometheus + , servant-server + , text + , time-units + , wai + , wai-cors + , wai-extra + , warp + , web-ghc test-suite web-ghc-test - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: test - other-modules: - default-language: Haskell2010 - ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wno-missing-import-lists -Wredundant-constraints - -fprint-potential-instances -Wunused-packages - build-depends: - base >=4.7 && <5, - tasty + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + other-modules: + default-language: Haskell2010 + ghc-options: + -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wno-missing-import-lists -Wredundant-constraints + -fprint-potential-instances -Wunused-packages + + build-depends: + base >=4.7 && <5 + , tasty