1
1
mirror of https://github.com/anoma/juvix.git synced 2024-10-26 09:45:47 +03:00
juvix/tests/negative
Paul Cadman 52a3eed162
Support extract-module-statements attribute in juvix code blocks (#2734)
This PR adds support for the `extract-module-statements` attribute for
Juvix code blocks:

So if you write something like the following block in a Juvix markdown
file:

````
```juvix extract-module-statements
module Foo;
   type T := t;
end;
```
````

The statement `type T := t;` from the body of the module is rendered in
the output. The `module Foo;` , and `end;` lines are not rendered in the
output.

A block with the `extract-module-statements` must contain a single local
module statement and nothing else. An error is reported if this is not
the case.

The `extract-module-statements` attribute also takes an optional
argument. It sets the number of statements from the module body to drop
from the output.

In the following example, the output will contain the single line `a : T
:= t;`.

````
```juvix extract-module-statements 1
module Foo;
   type T := t;
   a : T  := t;
end;
```
````

---------

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2024-04-18 17:01:59 +01:00
..
230 Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
258 Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
265 Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
BindGroupConflict Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
Dependencies Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
ImportCycle Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
Internal Improve formatting of function definition arguments (#2551) 2023-12-07 11:26:48 +01:00
issue1337 Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
issue1344 Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
issue1700 Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
Markdown Support extract-module-statements attribute in juvix code blocks (#2734) 2024-04-18 17:01:59 +01:00
NoDependencies Extract builtin definitions for loading a Package into bundled package-base package (#2535) 2023-11-30 16:22:18 +00:00
Package Extract builtin definitions for loading a Package into bundled package-base package (#2535) 2023-11-30 16:22:18 +00:00
StdlibConflict Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
Termination Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
UsingHiding Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
AliasCycle.juvix Aliasing (#2301) 2023-08-25 15:28:58 +02:00
AmbiguousConstructor.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
AmbiguousExport.juvix Change syntax for ind. data types and forbid the empty data type (#1684) 2023-01-03 13:49:04 +01:00
AmbiguousModule.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
AmbiguousSymbol.juvix Change syntax for ind. data types and forbid the empty data type (#1684) 2023-01-03 13:49:04 +01:00
AppLeftImplicit.juvix Fix #2495 (#2496) 2023-11-03 21:23:57 +01:00
AsPatternAlias.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
ConstructorExpectedLeftApplication.juvix Fix #2495 (#2496) 2023-11-03 21:23:57 +01:00
DanglingJudoc.juvix Add dangling judoc error (#2099) 2023-05-16 15:39:43 +02:00
DefaultArgCycle.juvix Fix remove unexpected whitespaces introduced by formatting (#2489) 2023-11-03 12:51:45 +01:00
DuplicateArgument.juvix Named arguments (#2250) 2023-07-18 10:32:34 +01:00
DuplicateInductiveParameterName.juvix Named arguments (#2250) 2023-07-18 10:32:34 +01:00
DuplicateOperator.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
ErrorOnLocalInstances.juvix Error on local instances (#2376) 2023-09-21 10:34:28 +01:00
ImplicitPatternLeftApplication.juvix Fix #2495 (#2496) 2023-11-03 21:23:57 +01:00
IncomparablePrecedences.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
InfixError.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
InfixErrorP.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
InvalidDefault.juvix Add default arguments (#2408) 2023-10-10 23:28:06 +02:00
InvalidRangeNumber.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
Iterators1.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
Iterators2.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
Iterators3.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
Iterators4.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
Iterators5.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
LetOpen.juvix Allow open statements in let expressions (#2395) 2023-10-02 23:13:45 +02:00
MissingArgument.juvix Named arguments (#2250) 2023-07-18 10:32:34 +01:00
MissingFields.juvix Record creation syntax with function definitions (#2369) 2023-09-28 17:07:38 +02:00
ModuleNotInScope.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
MultipleDeclarations.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
MultipleExportConflict.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
NestedAsPatterns.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
NestedPatternBraces.juvix Traits (#2320) 2023-09-08 12:16:43 +02:00
NoNamedArguments.juvix Record updates (#2263) 2023-08-07 12:35:36 +02:00
NotARecord.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
NotInScope.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
Package.juvix Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
PragmasDuplicateKeys.juvix Error on duplicate keys in YAML (#2290) 2023-08-11 09:22:22 +01:00
PragmasFormat.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
PragmasYAML.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
PrecedenceInconsistency.juvix Fix precedence inconsistency bug (#2470) 2023-10-25 16:13:27 +02:00
QualSymNotInScope.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
RepeatedFieldPattern.juvix Fix formatting for all Juvix files in tests folder (#2404) 2023-10-31 18:36:34 +01:00
RepeatedNameSignature.juvix Named arguments (#2250) 2023-07-18 10:32:34 +01:00
Tab.juvix Disallow tab characters as spaces (#1523) 2022-09-07 13:59:41 +02:00
UnexpectedArgument.juvix Named arguments (#2250) 2023-07-18 10:32:34 +01:00
UnexpectedArgumentNew.juvix Named arguments syntax with function definitions (#2494) 2023-11-07 12:02:22 +01:00
UnexpectedArgumentWildcard.juvix Named arguments (#2250) 2023-07-18 10:32:34 +01:00
UnexpectedFieldUpdate.juvix Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
UnusedOperatorDef.juvix New fixity/iterator syntax (#2332) 2023-09-14 10:57:38 +02:00
WrongModuleName.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00