1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-01 00:04:58 +03:00
juvix/tests/negative
Łukasz Czajka eebe961321
User-friendly operator declaration syntax (#2270)
* Closes #1964 

Adds the possibility to define operator fixities. They live in a
separate namespace. Standard library defines a few in
`Stdlib.Data.Fixity`:
```

syntax fixity rapp {arity: binary, assoc: right};
syntax fixity lapp {arity: binary, assoc: left, same: rapp};
syntax fixity seq {arity: binary, assoc: left, above: [lapp]};

syntax fixity functor {arity: binary, assoc: right};

syntax fixity logical {arity: binary, assoc: right, above: [seq]};
syntax fixity comparison {arity: binary, assoc: none, above: [logical]};

syntax fixity pair {arity: binary, assoc: right};
syntax fixity cons {arity: binary, assoc: right, above: [pair]};

syntax fixity step {arity: binary, assoc: right};
syntax fixity range {arity: binary, assoc: right, above: [step]};

syntax fixity additive {arity: binary, assoc: left, above: [comparison, range, cons]};
syntax fixity multiplicative {arity: binary, assoc: left, above: [additive]};

syntax fixity composition {arity: binary, assoc: right, above: [multiplicative]};
```

The fixities are identifiers in a separate namespace (different from
symbol and module namespaces). They can be exported/imported and then
used in operator declarations:
```
import Stdlib.Data.Fixity open;

syntax operator && logical;
syntax operator || logical;
syntax operator + additive;
syntax operator * multiplicative;
```
2023-08-09 18:15:51 +02:00
..
230 User-friendly operator declaration syntax (#2270) 2023-08-09 18:15:51 +02:00
258 Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
265 Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
BindGroupConflict Change syntax for ind. data types and forbid the empty data type (#1684) 2023-01-03 13:49:04 +01:00
Dependencies Fix dependencies suggestion in missing module error (#2024) 2023-04-22 18:15:38 +01:00
ImportCycle Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
Internal Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
issue1337 Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
issue1344 Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
issue1700 Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
NoDependencies Fix dependencies suggestion in missing module error (#2024) 2023-04-22 18:15:38 +01:00
StdlibConflict Fix Makefile target bugs for formatting and type Checking Juvix files (#2057) 2023-05-19 17:33:56 +02:00
Termination User-friendly operator declaration syntax (#2270) 2023-08-09 18:15:51 +02:00
UsingHiding Scope check symbols inside using {..} and hiding {..} (#2108) 2023-05-22 11:41:13 +02:00
AmbiguousConstructor.juvix Change syntax for ind. data types and forbid the empty data type (#1684) 2023-01-03 13:49:04 +01: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 Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
AsPatternAlias.juvix Improve As-Pattern parsing (#1603) 2022-11-03 10:02:22 +01:00
ConstructorExpectedLeftApplication.juvix Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
DanglingJudoc.juvix Add dangling judoc error (#2099) 2023-05-16 15:39:43 +02: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 User-friendly operator declaration syntax (#2270) 2023-08-09 18:15:51 +02:00
ImplicitPatternLeftApplication.juvix Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
InfixError.juvix User-friendly operator declaration syntax (#2270) 2023-08-09 18:15:51 +02:00
InfixErrorP.juvix User-friendly operator declaration syntax (#2270) 2023-08-09 18:15:51 +02:00
Iterators1.juvix Iterator syntax (#2126) 2023-05-30 15:30:11 +02:00
Iterators2.juvix Disallow iterators with zero ranges (#2267) 2023-08-03 11:43:59 +02:00
Iterators3.juvix Iterator syntax (#2126) 2023-05-30 15:30:11 +02:00
Iterators4.juvix Iterator syntax (#2126) 2023-05-30 15:30:11 +02:00
Iterators5.juvix Iterator syntax (#2126) 2023-05-30 15:30:11 +02:00
juvix.yaml Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
LacksFunctionClause.juvix Fix Makefile target bugs for formatting and type Checking Juvix files (#2057) 2023-05-19 17:33:56 +02:00
LacksTypeSig2.juvix Allow shadowing local variables with let function definitions (#1847) 2023-02-22 10:26:54 +01:00
LacksTypeSig.juvix remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
LetMissingClause.juvix Format juvix files using new function syntax (#2245) 2023-07-11 17:22:07 +02:00
MissingArgument.juvix Named arguments (#2250) 2023-07-18 10:32:34 +01: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 Improve As-Pattern parsing (#1603) 2022-11-03 10:02:22 +01:00
NestedPatternBraces.juvix remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
NoNamedArguments.juvix Record updates (#2263) 2023-08-07 12:35:36 +02:00
NotARecord.juvix Record updates (#2263) 2023-08-07 12:35:36 +02:00
NotInScope.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
PragmasFormat.juvix Add: pragma support (#1997) 2023-04-26 15:26:13 +02:00
PragmasYAML.juvix Iterator syntax (#2126) 2023-05-30 15:30:11 +02:00
QualSymNotInScope.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
RepeatedFieldPattern.juvix Record patterns (#2271) 2023-08-08 16:01:20 +02: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
UnexpectedArgumentWildcard.juvix Named arguments (#2250) 2023-07-18 10:32:34 +01:00
UnexpectedFieldUpdate.juvix Record updates (#2263) 2023-08-07 12:35:36 +02:00
UnusedOperatorDef.juvix User-friendly operator declaration syntax (#2270) 2023-08-09 18:15:51 +02:00
WrongModuleName.juvix Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00