Skip to content

Commit

Permalink
Fixed warnings, fixed 'stack.yaml'
Browse files Browse the repository at this point in the history
  • Loading branch information
effectfully committed Jul 24, 2021
1 parent 099ba8d commit d96f9fb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
4 changes: 0 additions & 4 deletions cabal.project
Expand Up @@ -187,11 +187,7 @@ source-repository-package
location: https://github.com/input-output-hk/hedgehog-extras
tag: 8bcd3c9dc22cc44f9fcfe161f4638a384fc7a187

-- The following dependencies are not mirrored in the
-- stack.yaml file, but they are needed regardless by cabal.
source-repository-package
type: git
location: https://github.com/input-output-hk/goblins
tag: cde90a2b27f79187ca8310b6549331e59595e7ba


12 changes: 6 additions & 6 deletions plutus-core/plutus-ir/src/PlutusIR/Core/Instance/Scoping.hs
Expand Up @@ -43,10 +43,10 @@ instance tyname ~ TyName => Reference TyName (Datatype tyname name uni fun) wher
Datatype dataAnn dataDecl params matchName $ map goConstr constrs where
tyVar = TyVar (reg tyname) tyname

goConstr (VarDecl ann constrName constrTy) = VarDecl ann constrName $ goTyFun constrTy
goConstr (VarDecl ann constrName constrTy) = VarDecl ann constrName $ goSpine constrTy

goTyFun (TyFun ann dom cod) = TyFun ann (referenceVia reg tyname dom) $ goTyFun cod
goTyFun ty = TyFun NotAName tyVar $ goTyApp ty
goSpine (TyFun ann dom cod) = TyFun ann (referenceVia reg tyname dom) $ goSpine cod
goSpine ty = TyFun NotAName tyVar $ goTyApp ty

goTyApp (TyApp ann fun arg) = TyApp ann (goTyApp fun) $ referenceVia reg tyname arg
goTyApp ty = TyApp NotAName ty tyVar
Expand Down Expand Up @@ -100,13 +100,13 @@ establishScopingConstrTy
-> [TyVarDecl TyName NameAnn]
-> Type TyName uni ann
-> m (Type TyName uni NameAnn)
establishScopingConstrTy regSelf dataName params = goTyFun where
establishScopingConstrTy regSelf dataName params = goSpine where
toDataAppliedToParams reg
= mkIterTyApp NotAName (TyVar (reg dataName) dataName)
$ map (\(TyVarDecl _ name _) -> TyVar (registerBound name) name) params

goTyFun (TyFun _ dom cod) = TyFun NotAName <$> establishScoping dom <*> goTyFun cod
goTyFun ty = TyFun NotAName (toDataAppliedToParams regSelf) <$> goTyApp ty
goSpine (TyFun _ dom cod) = TyFun NotAName <$> establishScoping dom <*> goSpine cod
goSpine ty = TyFun NotAName (toDataAppliedToParams regSelf) <$> goTyApp ty

goTyApp (TyApp _ fun arg) = TyApp NotAName <$> goTyApp fun <*> establishScoping arg
-- TODO: mention the weird thing that this does.
Expand Down
15 changes: 6 additions & 9 deletions plutus-core/plutus-ir/src/PlutusIR/Transform/Rename.hs
Expand Up @@ -18,17 +18,12 @@ import PlutusPrelude
import PlutusIR
import PlutusIR.Mark

import qualified PlutusCore as PLC
import qualified PlutusCore.Name as PLC
import qualified PlutusCore.Rename.Internal as PLC
import qualified PlutusCore as PLC
import qualified PlutusCore.Name as PLC
import qualified PlutusCore.Rename.Internal as PLC

import Control.Monad.Reader
import Control.Monad.Trans.Cont (ContT (..))

import Control.Monad.Except
import Data.Set as Set
import qualified PlutusCore.Quote as PLC
import PlutusCore.StdLib.Data.List
import Control.Monad.Trans.Cont (ContT (..))

{- Note [Renaming of mutually recursive bindings]
The 'RenameM' monad is a newtype wrapper around @ReaderT renaming Quote@, so in order to bring
Expand Down Expand Up @@ -123,6 +118,8 @@ captureContext k = do
-- Nil :: List_2 a_1
-- Cons :: a_1 -> List_2 a_1 -> List_2 a_1

-- TODO: handle 'TyForall' as well!

renameConstrTypeM
:: (PLC.HasRenaming ren PLC.TypeUnique, PLC.HasUniques (Type tyname uni ann), PLC.MonadQuote m)
=> Restorer ren m -> Type tyname uni ann -> PLC.RenameT ren m (Type tyname uni ann)
Expand Down
14 changes: 10 additions & 4 deletions stack.yaml
Expand Up @@ -72,6 +72,9 @@ extra-deps:
- beam-core-0.9.0.0@sha256:e5b1cb4d5b8a8a166f3373e8718672a3884feb9a5a133404b047b0af76538023,5282
- beam-migrate-0.5.0.0@sha256:d3f7e333ec9e96122ccec6be0d38a88f766dfc248323be73fd0b3cee245ea421,4923
- beam-sqlite-0.5.0.0@sha256:d785bf40101235a72b80652ce27be9c8048de5f7c171ccb23e1e62b8f1ce6e7c,3496
- Unique-0.4.7.8
- moo-1.2
- gray-code-0.3.1

# cabal.project is the source of truth for these pins, they are explained there
# and need to be kept in sync.
Expand All @@ -84,8 +87,9 @@ extra-deps:
- git: https://github.com/input-output-hk/cardano-crypto.git
commit: ce8f1934e4b6252084710975bd9bbc0a4648ece4
- git: https://github.com/input-output-hk/ouroboros-network
commit: e50613562d6d4a0f933741fcf590b0f69a1eda67
commit: e338f2cf8e1078fbda9555dd2b169c6737ef6774
subdirs:
- monoidal-synchronisation
- typed-protocols
- typed-protocols-examples
- ouroboros-network
Expand All @@ -96,7 +100,7 @@ extra-deps:
- ouroboros-consensus-cardano
- ouroboros-consensus-shelley
- io-sim
- io-sim-classes
- io-classes
- network-mux
- git: https://github.com/input-output-hk/cardano-prelude
commit: fd773f7a58412131512b9f694ab95653ac430852
Expand All @@ -114,7 +118,7 @@ extra-deps:
- cardano-crypto-praos
- strict-containers
- git: https://github.com/input-output-hk/cardano-ledger-specs
commit: a3ef848542961079b7cd53d599e5385198a3035c
commit: b8f1ebb46a91f1c634e616feb89ae34de5937e17
subdirs:
- byron/chain/executable-spec
- byron/crypto
Expand All @@ -138,13 +142,15 @@ extra-deps:
- tracer-transformers
- plugins/backend-ekg
- git: https://github.com/input-output-hk/cardano-node.git
commit: b3cabae6b3bf30a0b1b4e78bc4b67282dabad0a6
commit: f3ef4ed72894499160f2330b91572a159005c148
subdirs:
- cardano-api
- git: https://github.com/input-output-hk/Win32-network
commit: 94153b676617f8f33abe8d8182c37377d2784bd1
- git: https://github.com/input-output-hk/hedgehog-extras
commit: 8bcd3c9dc22cc44f9fcfe161f4638a384fc7a187
- git: https://github.com/input-output-hk/goblins
commit: cde90a2b27f79187ca8310b6549331e59595e7ba

allow-newer: true

Expand Down

0 comments on commit d96f9fb

Please sign in to comment.