Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/input-output-hk/plutus in…
Browse files Browse the repository at this point in the history
…to effectfully/builtins/replace-EvaluationResult-with-BuiltinResult
  • Loading branch information
effectfully committed Apr 29, 2024
2 parents 756d477 + 2748f90 commit 06a7b66
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions plutus-tx-plugin/test/Plugin/NoTrace/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ noTrace = pure do
3 @=? countTraces WithTraces.traceRepeatedly
, testCase "trace-impure" $
1 @=? countTraces WithTraces.traceImpure
, testCase "trace-impure with effect" $ -- See note [Impure trace messages]
, testCase "trace-impure with effect" $ -- See Note [Impure trace messages]
assertBool "Effect is missing" (Lib.evaluatesToError WithTraces.traceImpure)
]
, testGroup
Expand All @@ -55,7 +55,7 @@ noTrace = pure do
0 @=? countTraces WithoutTraces.traceRepeatedly
, testCase "trace-impure" $
0 @=? countTraces WithoutTraces.traceImpure
, testCase "trace-impure without effect" $ -- See note [Impure trace messages]
, testCase "trace-impure without effect" $ -- See Note [Impure trace messages]
assertBool "Effect wasn't erased" (Lib.evaluatesWithoutError WithoutTraces.traceImpure)
]
]
2 changes: 1 addition & 1 deletion plutus-tx/src/PlutusTx/Blueprint/Contract.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import PlutusTx.Blueprint.Validator (ValidatorBlueprint)
The 'referencedTypes' type variable is used to track the types used in the contract
making sure their schemas are included in the blueprint and that they are referenced
in a type-safe way. See the note ["Unrolling" types] for more details.
in a type-safe way. See Note ["Unrolling" types] for more details.
-}
data ContractBlueprint where
MkContractBlueprint ::
Expand Down
2 changes: 1 addition & 1 deletion plutus-tx/src/PlutusTx/Blueprint/Definition/Unroll.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import PlutusTx.Builtins.Internal (BuiltinByteString, BuiltinData, BuiltinList,
BuiltinUnit)

----------------------------------------------------------------------------------------------------
-- Functionality to "unroll" types. -- For more context see the note ["Unrolling" types] -----------
-- Functionality to "unroll" types. -- For more context see Note ["Unrolling" types] -----------

{- Note ["Unrolling" types]
Expand Down
18 changes: 9 additions & 9 deletions scripts/check-Notes.awk
Original file line number Diff line number Diff line change
Expand Up @@ -120,41 +120,41 @@ maybeSplitReference && /^[- \t-]*\[/ {
# Check for plural references
/(NOTES|Notes|notes) *\[/ {
printf ("Invalid note format (no plurals allowed) at %s:%d\n ", FILENAME, FNR)
printf ("> %s\n", $0)
printf ("> %s\n\n", $0)
exitCode = 1
}

# Check that we have at least one space after "Note"
/Note\[/ {
printf ("Invalid note format (space expected after \"Note\") at %s:%d\n", FILENAME, FNR)
printf ("> %s\n", $0)
printf ("> %s\n\n", $0)
exitCode = 1
}
# Check for invalid characters
/Note *[^ ] *\[/ { # There is a non-space (eg ":") between "Note" and "["
printf ("Invalid note format at %s:%d\n", FILENAME, FNR)
printf ("> %s\n", $0)
printf ("> %s\n\n", $0)
exitCode = 1
}

# Check for Haddock
/(--|{-) *\| *Note *\[/ {
printf ("Invalid note format (no Haddock allowed) at %s:%d ", FILENAME, FNR)
printf ("> %s\n", $0)
printf ("> %s\n\n", $0)
exitCode = 1
}

# Check for improper capitalisation
/(NOTE|note) *\[/ { # We require all references to be of the form `Note [...]`
printf ("Invalid note format (must say \"Note [...]\") at %s:%d\n", FILENAME, FNR)
printf ("> %s\n", $0)
printf ("> %s\n\n", $0)
exitCode = 1
}

# Make sure there's at least one space before "Note" in a definition
/(--|{-)Note *\[/ {
printf ("Invalid note format (space expected before \"Note\") at %s:%d\n", FILENAME, FNR)
printf ("> %s\n", $0)
printf ("> %s\n\n", $0)
exitCode = 1
}

Expand All @@ -164,7 +164,7 @@ maybeSplitReference && /^[- \t-]*\[/ {
if (defined[noteName]) {
if (longOutput) {
printf ("Duplicate Note [%s] at %s:%d and %s", noteName, FILENAME, FNR, defined[noteName])
printf ("> %s\n", $0)
printf ("> %s\n\n", $0)
}
else printf ("Duplicate Note [%s]\n", noteName)
}
Expand Down Expand Up @@ -198,13 +198,13 @@ END { # Report references which refer to missing Notes.
w = max(w,length(x))
for (x in referenced)
if (!(x in defined)) {
printf ("Missing Note %-*s%s\n", w+3, "["x"]", referenced[x])
printf ("Missing Note %-*s%s\n\n", w+3, "["x"]", referenced[x])
exitCode = 1
}
}
else for (x in referenced)
if (!(x in defined)) {
printf ("Missing Note [%s]\n", x)
printf ("Missing Note [%s]\n\n", x)
exitCode = 1
}
exit exitCode
Expand Down

0 comments on commit 06a7b66

Please sign in to comment.