diff --git a/CHANGELOG.md b/CHANGELOG.md index 4842566..7c93cb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# 0.6.0 - Bump plutus version to 1.7.0.0 + # 0.5.0 - More detailed parameter type encoding that supports data encoded parameters. - Add `PlyTypeName` and `plyTypeName` that replaces old `typeName` function. This provides mode detailed diff --git a/cabal.project b/cabal.project index 75fd403..5ef33fe 100644 --- a/cabal.project +++ b/cabal.project @@ -1,4 +1,8 @@ -index-state: 2022-10-31T00:00:00Z +packages: + ./ply-plutarch + ./ply-core + ./genPurs + ./example repository cardano-haskell-packages url: https://input-output-hk.github.io/cardano-haskell-packages @@ -11,31 +15,24 @@ repository cardano-haskell-packages c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56 d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee -index-state: cardano-haskell-packages 2022-10-31T00:00:00Z - -packages: - ./ply-plutarch - ./ply-core - ./genPurs - ./example - -write-ghc-environment-files: never - -tests: true - -test-show-details: direct - source-repository-package type: git - --sha256: sha256-K4FNHQUpq4V0XkP1AUfnwFtOc2BMK007dv9aAgFStVs= + --sha256: sha256-aeaZMW5Y3r5GdSyrfrrKOuGahcL5MVkDUNggunbmtv0= location: https://github.com/Plutonomicon/plutarch-plutus.git - tag: 95e40b42a1190191d0a07e3e4e938b72e6f75268 + tag: 288d9140468ae98abe1c9a4c0bb1c19a82eb7cd6 subdir: . plutarch-extra +write-ghc-environment-files: never + +tests: true + +test-show-details: direct + constraints: - dependent-sum >= 0.7.1.0 + , dependent-sum >= 0.7.1.0 + , plutus-core >= 1.7.0.0 package nothunks flags: +vector diff --git a/flake.lock b/flake.lock index d7f7264..df40e53 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1668433977, - "narHash": "sha256-JcfyzvIJeeXFu4nCJdR/uI9G5pmjcIZ79YxONKVy8GU=", + "lastModified": 1704207160, + "narHash": "sha256-vvm56KzA6jEkG3mvwh1LEdK4H4FKxeoOJNz90H8l8dQ=", "owner": "input-output-hk", "repo": "cardano-haskell-packages", - "rev": "7ba66a729344ced7636a419c99ddaba35d3f0b8f", + "rev": "3df392af2a61d61bdac1afd9c3674f27d6aa8efc", "type": "github" }, "original": { @@ -33,21 +33,6 @@ "type": "github" } }, - "blank": { - "locked": { - "lastModified": 1625557891, - "narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=", - "owner": "divnix", - "repo": "blank", - "rev": "5a5d2684073d9f563072ed07c871d577a6c614a8", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "blank", - "type": "github" - } - }, "cabal-32": { "flake": false, "locked": { @@ -68,11 +53,11 @@ "cabal-34": { "flake": false, "locked": { - "lastModified": 1640353650, - "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", + "lastModified": 1645834128, + "narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=", "owner": "haskell", "repo": "cabal", - "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "rev": "5ff598c67f53f7c4f48e31d722ba37172230c462", "type": "github" }, "original": { @@ -85,11 +70,11 @@ "cabal-36": { "flake": false, "locked": { - "lastModified": 1641652457, - "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "lastModified": 1669081697, + "narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=", "owner": "haskell", "repo": "cabal", - "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144", "type": "github" }, "original": { @@ -115,92 +100,19 @@ "type": "github" } }, - "devshell": { - "inputs": { - "flake-utils": [ - "haskellNix", - "tullia", - "std", - "flake-utils" - ], - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1663445644, - "narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=", - "owner": "numtide", - "repo": "devshell", - "rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "dmerge": { - "inputs": { - "nixlib": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ], - "yants": [ - "haskellNix", - "tullia", - "std", - "yants" - ] - }, - "locked": { - "lastModified": 1659548052, - "narHash": "sha256-fzI2gp1skGA8mQo/FBFrUAtY0GQkAIAaV/V127TJPyY=", - "owner": "divnix", - "repo": "data-merge", - "rev": "d160d18ce7b1a45b88344aa3f13ed1163954b497", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "data-merge", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { - "lastModified": 1635892615, - "narHash": "sha256-harGbMZr4hzat2BWBU+Y5OYXlu+fVz7E4WeQzHi5o8A=", + "lastModified": 1672831974, + "narHash": "sha256-z9k3MfslLjWQfnjBtEtJZdq3H7kyi2kQtUThfTgdRk0=", "owner": "input-output-hk", "repo": "flake-compat", - "rev": "eca47d3377946315596da653862d341ee5341318", + "rev": "45f2638735f8cdc40fe302742b79f248d23eb368", "type": "github" }, "original": { "owner": "input-output-hk", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", + "ref": "hkm/gitlab-fix", "repo": "flake-compat", "type": "github" } @@ -221,66 +133,6 @@ } }, "flake-utils_2": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_6": { "locked": { "lastModified": 1667077288, "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", @@ -312,33 +164,51 @@ "type": "github" } }, - "gomod2nix": { - "inputs": { - "nixpkgs": "nixpkgs_2", - "utils": "utils" + "ghc98X": { + "flake": false, + "locked": { + "lastModified": 1696643148, + "narHash": "sha256-E02DfgISH7EvvNAu0BHiPvl1E5FGMDi0pWdNZtIBC9I=", + "ref": "ghc-9.8", + "rev": "443e870d977b1ab6fc05f47a9a17bc49296adbd6", + "revCount": 61642, + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" }, + "original": { + "ref": "ghc-9.8", + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" + } + }, + "ghc99": { + "flake": false, "locked": { - "lastModified": 1655245309, - "narHash": "sha256-d/YPoQ/vFn1+GTmSdvbSBSTOai61FONxB4+Lt6w/IVI=", - "owner": "tweag", - "repo": "gomod2nix", - "rev": "40d32f82fc60d66402eb0972e6e368aeab3faf58", - "type": "github" + "lastModified": 1701580282, + "narHash": "sha256-drA01r3JrXnkKyzI+owMZGxX0JameMzjK0W5jJE/+V4=", + "ref": "refs/heads/master", + "rev": "f5eb0f2982e9cf27515e892c4bdf634bcfb28459", + "revCount": 62197, + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" }, "original": { - "owner": "tweag", - "repo": "gomod2nix", - "type": "github" + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" } }, "hackage": { "flake": false, "locked": { - "lastModified": 1668388507, - "narHash": "sha256-NrZF+AvPCgGwqIkFmq3VZBHDHHxWXRyE6A3VSWJtRr8=", + "lastModified": 1704241381, + "narHash": "sha256-LOWwnjVL2Wk1pP5boqY+5g6Yiu0/Pb1aKaXsYdssojA=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "b585a1d4005e8aa2c2d3958be88c960dec58540e", + "rev": "1d79ba01707abbb321020f9c568824f5040fbfc0", "type": "github" }, "original": { @@ -355,11 +225,18 @@ "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", "flake-compat": "flake-compat", - "flake-utils": "flake-utils_2", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", + "ghc98X": "ghc98X", + "ghc99": "ghc99", "hackage": "hackage", + "hls-1.10": "hls-1.10", + "hls-2.0": "hls-2.0", + "hls-2.2": "hls-2.2", + "hls-2.3": "hls-2.3", + "hls-2.4": "hls-2.4", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", + "iserv-proxy": "iserv-proxy", "nixpkgs": [ "haskellNix", "nixpkgs-unstable" @@ -368,17 +245,19 @@ "nixpkgs-2105": "nixpkgs-2105", "nixpkgs-2111": "nixpkgs-2111", "nixpkgs-2205": "nixpkgs-2205", + "nixpkgs-2211": "nixpkgs-2211", + "nixpkgs-2305": "nixpkgs-2305", + "nixpkgs-2311": "nixpkgs-2311", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", - "stackage": "stackage", - "tullia": "tullia" + "stackage": "stackage" }, "locked": { - "lastModified": 1668485534, - "narHash": "sha256-F3vszm6uCaQz9qo3SMZPkXoabWjp3B+JzPPopkCAibU=", + "lastModified": 1704242973, + "narHash": "sha256-D7u90bd/DS+qdtCSL1sgJxz8/p9SbnlOq8JIjfjuDcU=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "cbf1e918b6e278a81c385155605b8504e498efef", + "rev": "28485041f8ea4d859704896abf8ff514510a87f6", "type": "github" }, "original": { @@ -387,224 +266,198 @@ "type": "github" } }, - "hpc-coveralls": { + "hls-1.10": { "flake": false, "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", + "lastModified": 1680000865, + "narHash": "sha256-rc7iiUAcrHxwRM/s0ErEsSPxOR3u8t7DvFeWlMycWgo=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "b08691db779f7a35ff322b71e72a12f6e3376fd9", "type": "github" }, "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", + "owner": "haskell", + "ref": "1.10.0.0", + "repo": "haskell-language-server", "type": "github" } }, - "hydra": { - "inputs": { - "nix": "nix", - "nixpkgs": [ - "haskellNix", - "hydra", - "nix", - "nixpkgs" - ] - }, + "hls-2.0": { + "flake": false, "locked": { - "lastModified": 1646878427, - "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", - "owner": "NixOS", - "repo": "hydra", - "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", + "lastModified": 1687698105, + "narHash": "sha256-OHXlgRzs/kuJH8q7Sxh507H+0Rb8b7VOiPAjcY9sM1k=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "783905f211ac63edf982dd1889c671653327e441", "type": "github" }, "original": { - "id": "hydra", - "type": "indirect" + "owner": "haskell", + "ref": "2.0.0.1", + "repo": "haskell-language-server", + "type": "github" } }, - "lowdown-src": { + "hls-2.2": { "flake": false, "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "lastModified": 1693064058, + "narHash": "sha256-8DGIyz5GjuCFmohY6Fa79hHA/p1iIqubfJUTGQElbNk=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "b30f4b6cf5822f3112c35d14a0cba51f3fe23b85", "type": "github" }, "original": { - "owner": "kristapsdz", - "repo": "lowdown", + "owner": "haskell", + "ref": "2.2.0.0", + "repo": "haskell-language-server", "type": "github" } }, - "mdbook-kroki-preprocessor": { + "hls-2.3": { "flake": false, "locked": { - "lastModified": 1661755005, - "narHash": "sha256-1TJuUzfyMycWlOQH67LR63/ll2GDZz25I3JfScy/Jnw=", - "owner": "JoelCourtney", - "repo": "mdbook-kroki-preprocessor", - "rev": "93adb5716d035829efed27f65f2f0833a7d3e76f", + "lastModified": 1695910642, + "narHash": "sha256-tR58doOs3DncFehHwCLczJgntyG/zlsSd7DgDgMPOkI=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "458ccdb55c9ea22cd5d13ec3051aaefb295321be", "type": "github" }, "original": { - "owner": "JoelCourtney", - "repo": "mdbook-kroki-preprocessor", + "owner": "haskell", + "ref": "2.3.0.0", + "repo": "haskell-language-server", "type": "github" } }, - "n2c": { - "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, + "hls-2.4": { + "flake": false, "locked": { - "lastModified": 1665039323, - "narHash": "sha256-SAh3ZjFGsaCI8FRzXQyp56qcGdAqgKEfJWPCQ0Sr7tQ=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "b008fe329ffb59b67bf9e7b08ede6ee792f2741a", + "lastModified": 1699862708, + "narHash": "sha256-YHXSkdz53zd0fYGIYOgLt6HrA0eaRJi9mXVqDgmvrjk=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "54507ef7e85fa8e9d0eb9a669832a3287ffccd57", "type": "github" }, "original": { - "owner": "nlewo", - "repo": "nix2container", + "owner": "haskell", + "ref": "2.4.0.1", + "repo": "haskell-language-server", "type": "github" } }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs", - "nixpkgs-regression": "nixpkgs-regression" - }, + "hpc-coveralls": { + "flake": false, "locked": { - "lastModified": 1643066034, - "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", - "owner": "NixOS", - "repo": "nix", - "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "2.6.0", - "repo": "nix", + "owner": "sevanspowell", + "repo": "hpc-coveralls", "type": "github" } }, - "nix-nomad": { + "hydra": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": [ - "haskellNix", - "tullia", - "nix2container", - "flake-utils" - ], - "gomod2nix": "gomod2nix", + "nix": "nix", "nixpkgs": [ "haskellNix", - "tullia", - "nixpkgs" - ], - "nixpkgs-lib": [ - "haskellNix", - "tullia", + "hydra", + "nix", "nixpkgs" ] }, "locked": { - "lastModified": 1658277770, - "narHash": "sha256-T/PgG3wUn8Z2rnzfxf2VqlR1CBjInPE0l1yVzXxPnt0=", - "owner": "tristanpemble", - "repo": "nix-nomad", - "rev": "054adcbdd0a836ae1c20951b67ed549131fd2d70", + "lastModified": 1671755331, + "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", + "owner": "NixOS", + "repo": "hydra", + "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", "type": "github" }, "original": { - "owner": "tristanpemble", - "repo": "nix-nomad", - "type": "github" + "id": "hydra", + "type": "indirect" } }, - "nix2container": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_3" + "iserv-proxy": { + "flake": false, + "locked": { + "lastModified": 1691634696, + "narHash": "sha256-MZH2NznKC/gbgBu8NgIibtSUZeJ00HTLJ0PlWKCBHb0=", + "ref": "hkm/remote-iserv", + "rev": "43a979272d9addc29fbffc2e8542c5d96e993d73", + "revCount": 14, + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" }, + "original": { + "ref": "hkm/remote-iserv", + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + } + }, + "lowdown-src": { + "flake": false, "locked": { - "lastModified": 1658567952, - "narHash": "sha256-XZ4ETYAMU7XcpEeAFP3NOl9yDXNuZAen/aIJ84G+VgA=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "60bb43d405991c1378baf15a40b5811a53e32ffa", + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", "type": "github" }, "original": { - "owner": "nlewo", - "repo": "nix2container", + "owner": "kristapsdz", + "repo": "lowdown", "type": "github" } }, - "nixago": { + "nix": { "inputs": { - "flake-utils": [ - "haskellNix", - "tullia", - "std", - "flake-utils" - ], - "nixago-exts": [ - "haskellNix", - "tullia", - "std", - "blank" - ], - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs", + "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1661824785, - "narHash": "sha256-/PnwdWoO/JugJZHtDUioQp3uRiWeXHUdgvoyNbXesz8=", - "owner": "nix-community", - "repo": "nixago", - "rev": "8c1f9e5f1578d4b2ea989f618588d62a335083c3", + "lastModified": 1661606874, + "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", + "owner": "NixOS", + "repo": "nix", + "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nixago", + "owner": "NixOS", + "ref": "2.11.0", + "repo": "nix", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1632864508, - "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", + "lastModified": 1657693803, + "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", + "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", "type": "github" }, "original": { - "id": "nixpkgs", - "ref": "nixos-21.05-small", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-22.05-small", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-2003": { @@ -657,11 +510,11 @@ }, "nixpkgs-2205": { "locked": { - "lastModified": 1663981975, - "narHash": "sha256-TKaxWAVJR+a5JJauKZqibmaM5e/Pi5tBDx9s8fl/kSE=", + "lastModified": 1685573264, + "narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "309faedb8338d3ae8ad8f1043b3ccf48c9cc2970", + "rev": "380be19fbd2d9079f677978361792cb25e8a3635", "type": "github" }, "original": { @@ -671,85 +524,87 @@ "type": "github" } }, - "nixpkgs-regression": { + "nixpkgs-2211": { "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "lastModified": 1688392541, + "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", "type": "github" }, "original": { - "id": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "indirect" + "owner": "NixOS", + "ref": "nixpkgs-22.11-darwin", + "repo": "nixpkgs", + "type": "github" } }, - "nixpkgs-unstable": { + "nixpkgs-2305": { "locked": { - "lastModified": 1663905476, - "narHash": "sha256-0CSwRKaYravh9v6qSlBpM0gNg0UhKT2lL7Yn6Zbx7UM=", + "lastModified": 1701362232, + "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e14f9fb57315f0d4abde222364f19f88c77d2b79", + "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixpkgs-23.05-darwin", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_2": { + "nixpkgs-2311": { "locked": { - "lastModified": 1653581809, - "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", + "lastModified": 1701386440, + "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", + "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-23.11-darwin", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_3": { + "nixpkgs-regression": { "locked": { - "lastModified": 1654807842, - "narHash": "sha256-ADymZpr6LuTEBXcy6RtFHcUZdjKTBRTMYwu19WOx17E=", + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fc909087cc3386955f21b4665731dbdaceefb1d8", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" } }, - "nixpkgs_4": { + "nixpkgs-unstable": { "locked": { - "lastModified": 1665087388, - "narHash": "sha256-FZFPuW9NWHJteATOf79rZfwfRn5fE0wi9kRzvGfDHPA=", - "owner": "nixos", + "lastModified": 1694822471, + "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "95fda953f6db2e9496d2682c4fc7b82f959878f7", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", + "owner": "NixOS", "repo": "nixpkgs", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_2": { "locked": { "lastModified": 1667292599, "narHash": "sha256-7ISOUI1aj6UKMPIL+wwthENL22L3+A9V+jS8Is3QsRo=", @@ -782,8 +637,8 @@ }, "pre-commit-hooks": { "inputs": { - "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_5" + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1667992213, @@ -814,11 +669,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1668388618, - "narHash": "sha256-2gWOWqdwtruJ+Dj2yCFQz+SDNC58LEsUdI1FycKXzYQ=", + "lastModified": 1704240578, + "narHash": "sha256-ohD46C7WcIvAqXTVe9nVmx/big4smsCBAHLcA+i4/P8=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "754e9647154ba2ea5ff5c6e5549ecc98898b7a90", + "rev": "2d5e3bdb9efc0559457f7df2576cfe6e1469f3c8", "type": "github" }, "original": { @@ -826,106 +681,6 @@ "repo": "stackage.nix", "type": "github" } - }, - "std": { - "inputs": { - "blank": "blank", - "devshell": "devshell", - "dmerge": "dmerge", - "flake-utils": "flake-utils_4", - "makes": [ - "haskellNix", - "tullia", - "std", - "blank" - ], - "mdbook-kroki-preprocessor": "mdbook-kroki-preprocessor", - "microvm": [ - "haskellNix", - "tullia", - "std", - "blank" - ], - "n2c": "n2c", - "nixago": "nixago", - "nixpkgs": "nixpkgs_4", - "yants": "yants" - }, - "locked": { - "lastModified": 1665513321, - "narHash": "sha256-D6Pacw9yf/HMs84KYuCxHXnNDL7v43gtcka5URagFqE=", - "owner": "divnix", - "repo": "std", - "rev": "94a90eedb9cfc115b12ae8f6622d9904788559e4", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "std", - "type": "github" - } - }, - "tullia": { - "inputs": { - "nix-nomad": "nix-nomad", - "nix2container": "nix2container", - "nixpkgs": [ - "haskellNix", - "nixpkgs" - ], - "std": "std" - }, - "locked": { - "lastModified": 1666200256, - "narHash": "sha256-cJPS8zBu30SMhxMe7I8DWutwqMuhPsEez87y9gxMKc4=", - "owner": "input-output-hk", - "repo": "tullia", - "rev": "575362c2244498e8d2c97f72861510fa72e75d44", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "tullia", - "type": "github" - } - }, - "utils": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "yants": { - "inputs": { - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660507851, - "narHash": "sha256-BKjq7JnVuUR/xDtcv6Vm9GYGKAblisXrAgybor9hT/s=", - "owner": "divnix", - "repo": "yants", - "rev": "0b895ca02a8fa72bad50b454cb3e7d8a66407c96", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "yants", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 7043299..04407a4 100644 --- a/flake.nix +++ b/flake.nix @@ -51,7 +51,7 @@ ply = pkgs.haskell-nix.cabalProject' { src = ./.; - compiler-nix-name = "ghc925"; + compiler-nix-name = "ghc963"; shell = { # This is used by `nix develop .` to open a shell for use with # `cabal`, `hlint` and `haskell-language-server` etc diff --git a/genPurs/genPurs.cabal b/genPurs/genPurs.cabal index 0e76fee..567f467 100644 --- a/genPurs/genPurs.cabal +++ b/genPurs/genPurs.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: ply-ctl -version: 0.5.0 +version: 0.6.0 author: Seungheon license: MIT diff --git a/ply-core/ply-core.cabal b/ply-core/ply-core.cabal index cfb76ac..536a66e 100644 --- a/ply-core/ply-core.cabal +++ b/ply-core/ply-core.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: ply-core -version: 0.5.0 +version: 0.6.0 author: Chase license: MIT diff --git a/ply-core/src/Ply/Core/Types.hs b/ply-core/src/Ply/Core/Types.hs index bd01fcd..fd5f7ac 100644 --- a/ply-core/src/Ply/Core/Types.hs +++ b/ply-core/src/Ply/Core/Types.hs @@ -34,7 +34,7 @@ import Data.Aeson.Types ( import Cardano.Binary as CBOR (DecoderError) import qualified Cardano.Binary as CBOR -import PlutusLedgerApi.Common (deserialiseUPLC, serialiseUPLC) +import PlutusLedgerApi.Common (serialiseUPLC, uncheckedDeserialiseUPLC) import UntypedPlutusCore (DeBruijn, DefaultFun, DefaultUni, Program) import Ply.Core.Serialize.Script (serializeScriptCbor) @@ -86,7 +86,7 @@ data TypedScriptEnvelope = TypedScriptEnvelope deriving stock (Eq, Show) cborToScript :: ByteString -> Either DecoderError UPLCProgram -cborToScript x = deserialiseUPLC <$> CBOR.decodeFull' x +cborToScript x = uncheckedDeserialiseUPLC <$> CBOR.decodeFull' x instance FromJSON TypedScriptEnvelope where parseJSON (Object v) = diff --git a/ply-core/src/Ply/Core/UPLC.hs b/ply-core/src/Ply/Core/UPLC.hs index 6f90ffe..ec85524 100644 --- a/ply-core/src/Ply/Core/UPLC.hs +++ b/ply-core/src/Ply/Core/UPLC.hs @@ -5,21 +5,22 @@ import Data.String (IsString) import PlutusCore (Some (Some), ValueOf (ValueOf)) import qualified PlutusCore as PLC +import PlutusCore.Version (plcVersion100) import UntypedPlutusCore ( DeBruijn (DeBruijn), DefaultFun, DefaultUni, Index, Program (Program), - Term (Apply, Builtin, Constant, Delay, Error, Force, LamAbs, Var), + Term (Apply, Builtin, Case, Constant, Constr, Delay, Error, Force, LamAbs, Var), Version, ) -pattern DefaultVersion :: Version () +pattern DefaultVersion :: Version pattern DefaultVersion <- - ((== PLC.defaultVersion ()) -> True) + ((== plcVersion100) -> True) where - DefaultVersion = PLC.defaultVersion () + DefaultVersion = plcVersion100 {- | Apply a 'DefaultUni' constant to given UPLC program, inlining if necessary. TODO: Subst optimizations when 'Apply'ing over non 'LamAbs' stuff as well, e.g chain of 'Apply'ies. @@ -63,6 +64,8 @@ _termIdOf (Apply () _ _) = "Apply" _termIdOf (LamAbs () _ _) = "LamAbs" _termIdOf (Delay () _) = "Delay" _termIdOf (Force () _) = "Force" +_termIdOf (Constr () _ _) = "Constr" +_termIdOf (Case () _ _) = "Case" isSmallConstant :: Some (ValueOf DefaultUni) -> Bool isSmallConstant c = case c of diff --git a/ply-plutarch/ply-plutarch.cabal b/ply-plutarch/ply-plutarch.cabal index c94e697..adf3330 100644 --- a/ply-plutarch/ply-plutarch.cabal +++ b/ply-plutarch/ply-plutarch.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: ply-plutarch -version: 0.5.0 +version: 0.6.0 author: Chase license: MIT