Open xarvh opened 1 year ago
name & []
>> Ok
Should be preserved.
Specifically: changing var & [] >> Ok
to var & [] \n >> Ok
should be enough to make the following try..as go on multiple lines:
try expr_ as
, FA.Constructor var: var & [] >> Ok
, FA.Call (FA.Expression _ _ (FA.Constructor var)) pars: var & pars >> Ok
, _: error env pos [ "I was expecting a 'constructor name here!" ]
error env pos
[
, "I was expecting a 'constructor name here!"
]
Should be preserved
FROM
[
, a
, b
>> c
>> d
]
TO
[
, a
, b
>> c
>> d
]
FROM
a :: b
TO
[a, b...]
[
, Prelude.unaryPlus.usr & unaryPlus
, Prelude.unaryMinus.usr & unaryMinus
#
, Prelude.add.usr
& binop "+"
, Prelude.multiply.usr & binop "*"
, Prelude.subtract.usr & binop "-"
, Prelude.mutableAssign.usr & binop "="
]
preserves text interpolation:
"""
const rec = (ls) => {
if (ls[0] === '""" .. listNilName .. """')
return hash;
"""
IT CURRENTLY BREAKS Runtime.sp!!!
FROM
resolve as fn fn key: Dict key whatever, key, [ key ], State key: State key with key NonFunction =
TO
resolve as fn (fn key: Dict key whatever), key, [ key ], State key: State key with key NonFunction =
This is just plain unreadable
[
, 3
& [
, TH.moduleUsr "a" & 1
, TH.moduleUsr "a" & 2
, TH.moduleUsr "p" & 1
, TH.moduleUsr "q" & 1
]
{} and [] can be on a single line only if they don't contain any commas? Would be annoying in annotations?
We have three types of fn formatting:
fn args: body
This is when body
fits a single line.
f =
fn meh:
nonIndentedBody
>> blah fn meh:
nonIndentedBody
someFunction fn args:
body
Case B) should have a blank line between fn and body. C) should not.
This is too long.
addErrorIf (uni /= expectedPatternType.uni) env (CA.patternPos caPattern) ('errorUniquenessDoesNotMatchParameter uni expectedPatternType) @state
We should calculate some sort of complexity-per-line and break the call into multiple lines if it hits a threshold.
If the last argument is a function that breaks into multiple lines, only its first line (ie, "fn a, b, c:") should be counted.
Constructors should be in alphabetic order, this is necessary because they are comparable and their order changes with their name.
A named function (ie,
x = fn ....
) should have a blank line after thefn ...:
FROM
TO
Named function's body should always be aligned, not indented.
FROM
TO
Parse multiple statements in parenthesis?
Multiline list items should be followed by a blank?
FROM
TO
Continuations should always be followed by a blank?
FROM
TO
How do we distinguish between the cases where the body of the lambda should be indented:
from those where it should not?