mirror of
https://github.com/anoma/juvix.git
synced 2024-12-01 00:04:58 +03:00
eebe961321
* 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; ``` |
||
---|---|---|
.. | ||
230 | ||
258 | ||
265 | ||
BindGroupConflict | ||
Dependencies | ||
ImportCycle | ||
Internal | ||
issue1337 | ||
issue1344 | ||
issue1700 | ||
NoDependencies | ||
StdlibConflict | ||
Termination | ||
UsingHiding | ||
AmbiguousConstructor.juvix | ||
AmbiguousExport.juvix | ||
AmbiguousModule.juvix | ||
AmbiguousSymbol.juvix | ||
AppLeftImplicit.juvix | ||
AsPatternAlias.juvix | ||
ConstructorExpectedLeftApplication.juvix | ||
DanglingJudoc.juvix | ||
DuplicateArgument.juvix | ||
DuplicateInductiveParameterName.juvix | ||
DuplicateOperator.juvix | ||
ImplicitPatternLeftApplication.juvix | ||
InfixError.juvix | ||
InfixErrorP.juvix | ||
Iterators1.juvix | ||
Iterators2.juvix | ||
Iterators3.juvix | ||
Iterators4.juvix | ||
Iterators5.juvix | ||
juvix.yaml | ||
LacksFunctionClause.juvix | ||
LacksTypeSig2.juvix | ||
LacksTypeSig.juvix | ||
LetMissingClause.juvix | ||
MissingArgument.juvix | ||
ModuleNotInScope.juvix | ||
MultipleDeclarations.juvix | ||
MultipleExportConflict.juvix | ||
NestedAsPatterns.juvix | ||
NestedPatternBraces.juvix | ||
NoNamedArguments.juvix | ||
NotARecord.juvix | ||
NotInScope.juvix | ||
PragmasFormat.juvix | ||
PragmasYAML.juvix | ||
QualSymNotInScope.juvix | ||
RepeatedFieldPattern.juvix | ||
RepeatedNameSignature.juvix | ||
Tab.juvix | ||
UnexpectedArgument.juvix | ||
UnexpectedArgumentWildcard.juvix | ||
UnexpectedFieldUpdate.juvix | ||
UnusedOperatorDef.juvix | ||
WrongModuleName.juvix |