Skip to content

m2-ls 2.10.0

Choose a tag to compare

@AlexanderGolys AlexanderGolys released this 22 Nov 00:41
· 2 commits to main since this release
  • The formatter lays files out as the Macaulay2 Core library is written:
    each line indented from the one above by the brackets it leaves open, a
    closer keeping its body's indentation, tabs every 8 columns; padding that
    aligns with a neighbouring line stays; line breaks
    are kept unless lines.breaks asks for wrapping or the Core layout of
    multi-line constructs. It refuses output that parses differently from its
    input, and formatting a formatted file changes nothing.

  • The formatting settings are grouped into indent, lines, layout,
    spacing and comments, each key one fixed rule, with the built-in
    presets profile = "core" and "modern". Every flat key of 2.9
    still loads as its replacement, with a deprecation warning;
    compactFactorOperators is reported as removed. Formatting no longer
    follows the editor's tabSize and insertSpaces.

  • The membership tests .? and #? are plain operators, no longer tagged
    memberAccess: they select nothing.

  • Parentheses spanning lines are never reported as redundant control
    parentheses: without them new M from (f) followed by \ L on the next
    line would end at the line break.

  • When every installation of a method returns the same type, T03 offers
    declaring it once, method(…, TypicalValue => Boolean), as its preferred
    fix, ahead of annotating each installation; Fix all in file inserts it
    once.

  • oo, ooo, oooo and oN are typed as Core.m2 rotates them: muted
    inputs count, each ;-ended statement is its own numbered input, a null
    value binds no oN and only shifts ooo and oooo, and inside a function
    body they are unknown, as they are read at the call.

  • TEST blocks and documentation examples see everything their package
    exports: globals the package file defines, those of the files it loads, and
    symbols only the export creates, such as an option name. E22 and S31 no
    longer flag them there.

  • S31 counts an earlier export {"Name"} as introducing Name.

  • Add the boolean semantic token type for true, false and other
    Boolean values (variable under standardOnly), so booleans keep their
    colour inside TEST blocks.

  • Highlighting a function's exits, from its -> or a return, also lights
    up the values its body ends with: each branch of a final if, each
    outcome of a final try.

  • ideal, monomialIdeal, matrix, module, ring, monoid, net,
    vector and complex are typed as making the type they are named after, whatever
    their argument: ideal R_* is an Ideal, so (ideal R_*)^3 is one and
    R/(ideal R_*)^3 a QuotientRing. Before, an argument of unknown type
    left them Thing.

  • S19, S20 and S21 no longer offer T X := f for new T from X := f,
    which installs a different method.

  • Remove S14 (forwarding-lambda): replacing c -> f c with f looks f
    up at once instead of at the call, which breaks a name bound later, and
    changes the class of the function.

  • Method dispatch counts only the methods whose domain types are all visible
    in the packages loaded, as an orphan rule would: a method of a package's
    own type, such as ideal(LieAlgebra) or Permutation ^ ZZ, no longer
    widens results in a file that does not load the package.