- ALWAYS CHECK COVERAGE!

- existing stories
  - "pure" declaration
    PM-7003
    - consider making pure functions available outside the Contract class or
      as static methods so no class instance need be created to call them.
    - also remove context and partialProofData arguments from calls to
      external circuits, or those marked pure if we make that distinction
  - restore full coverage
    PM-7004
  - add tests checking threading of private state (none yet do this) and add more tests
    checking threading of public state (currently only tiny.compact tests do this)
    PM-7005
  - print multiple error messages, if any, per compiler run
    PM-7006
  - augment COMPACT_PATH with path-parent of source and included files
    PM-7007
  - up-to-date and comprehensive documentation of the Compact language, compiler, and run time
    PM-7008

- new stories:
  - add flow-sensitive pass to determine when f-cached can be #t
  - error messages should print strings and identifiers in Compact syntax, i.e., with
    Compact escapes where needed ala javascript generated for assert messages
  - add teeth to the print-zkir tests.  from Thomas:
    Ideally the runtime's checkProofData can be called on the ZKIR
    output, and the <output>.proofData part of any circuit call in
    the JS target, and that should do a dry-run of proving against
    the given JS call (throwing an exception if it does something
    unexpected anywhere).  It's not as many teeth as we'd probably
    like, because the underlying function in ZKIR don't actually
    enforce a number of things right now, but it's probably the
    best we've got.
  - better set of pretty-formats, perhaps per-language, and re-rendering of test.ss so
    we have fewer diffs when making changes.  also rename variables according to the
    printing order rather than generation order.

future work:
 - Compact language improvements:
   - allow ";" after "export { Maybe }" and possibly other places (compactc note from piotr).
   - consider adding != operator
   - relational operators <, <=, >=, and > at least for Unsigned
   - null(type) => null[type](); consider renaming to empty, default, or default_value
   - sum types
     - should be able to drop maybe
     - might be able to drop null
   - REPL
 - PR for Chez Scheme to (a) print a message to stderr when execl fails, and
   (2) provide a way to get a subprocess's exit status
 - pull error-checking local functions out of generated javascript and into library
 - finish declaration-based approach for compiler handling of ledger ADTs
   - generate ADT documentation
 - make ADTs available separately from the ledger
 - consider putting extern struct names into a separate d.ts file for use by dapps
 - more tests checking ledger-declaration and ledger operation syntax errors
   including tests verifying generated javascript code from election.compact and zerocash.compact
 - consider optimization pass to be run before print-javascript
 - consider adding statement call to Lcircuit and Lflattened so we don't
   have to bind the outputs if they aren't used

language/parser:
 - Bytes references, mapping, folding; possibly allocation (bytes ---)
   - may need a byte type
   - when mapping over Bytes, output type could either always be Bytes,
     be Bytes iff the first vector argumument is Bytes, or
     be determined by the return value of the mapped function (byte =>
     Bytes, otherwise Vector)
 - consider: type syntax compatibility with typescript:
   - Boolean -> boolean, Field -> field, Void -> void
   - Vector should possibly be Array with type syntax "Array" "<" element-type ">"
     or element-type "[" "]", though we need a length as well, so perhaps
     "Array" "<" n "," element-type ">" or element-type "[" n "]".
 - local nonrecursive circuit definitions, scoped where they appear
   (but need inter-circuit flow analysis to identify possible
   references before assignments---simpler w/o recursion); first
   order (so no closure)
 - nominally named type aliaes, e.g., Feet and Meters for Field, with
   required casts to and from Field
 - A way to default-initialize any type, e.g. a `default` or `null` keyword.
   This is useful for emulating discriminated unions.
 - Tuple types would be useful for complex return values, vectors of complex
   inputs, and contract-to-contract calls, which will probably involve passing
   a calls arguments to a library function as a *single* argument.
 - A way to extract field- and byte- representations from any type, would be
   useful to hashing and committing to values. E.g. `field_repr` and
   `byte_repr` primitive operations, taking any argument and returning a
   `Vector[?, Field]` or `Bytes[?]` respectively. Mostly this only makes sense
   if directly fed into a `fold`.
 - later, possibly: add unsigned 64-bit integer with modular arithmetic

code/repo structure
 - move description of passes / languages from compiler.md to source code langs.ss passes.ss (command to convert them to description)
 - split unit tests into separate files (per pass)
 - split passes code into separate files ?
 - extract tests illustrating errors (explicit messages ?) for automatic:
   * extracting docs for errors
   * work with dev UX developers to improve errors

meta-evaluation to compare output of first and last passes on same program

compiler efficiency:
  - revisit environment and idset representations

add test mechanism to feed specific intermediate-code input into a pass
and use to test parts of passes not currently being exercised.

lexer:
  field constants:
    - consider supporting octal, hex, and binary syntax
          octal: 011, 0o11, 0O11
          hex: 0xabc, 0Xabc
          binary: 0b101, 0B101

ez-grammar:
  improve ez-grammar error messages:
   - record what we were looking for on the branch where we consumed the most tokens

document typescript / compactc differences
  - no for or while (use map and fold)
  - no dynamically sized vectors
  - argument and return types are not optional
  - no recursion among circuits (analog to functions)
  - no automatic conversion of datatypes
