~jojo/Carth

ref: 749208029494a7c48ce04444a513424f4b998416 Carth/std d---------
std: add TODO comment
std: add show-bool, id
std: use io/wrap instead of io/pure for display-inline

I.e., don't execute the action untio the IO is run
Add let & let1 forms to do macro
Add example list-monad to demo macro features & the do macro
Add patterns & declaration of literals in macros

Example of a do-notation-like macro using the new features:

    (defmacro do (<-)
      (case (do-bind ma) ma)
      (case (do-bind (<- a ma) mbs ...)
            (do-bind (fun (a) (do do-bind mbs ...)) ma))
      (case (do-bind ma mbs ...)
            (do-bind (fun (_) (do do-bind mbs ...)) ma)))

which can be used like

    (do list/bind
        (<- i (list 1 2 3))
        (<- j (list 1 2 3))
        (if (< i j)
            (list/singleton [i j])
          list/nil))
std: rename mod Memo back to Lazy & make Lazy thread safe

The evaluation and store of the computation of a Lazy is now
considered a critical section and locked behind a Mutex, which means
we will be able to share the same lazy value between threads, and they
will all be able to read it, and it will only be evaluated once.
std: Add Mutex
std: Fix io/pure always wrapping Unit
Add macro rules and ellipsis (...) macro operator
std: Add parse-int, parse-nat, parse-digit, digit?
std: Temporarily add {<,}o{3,4,5}{,>} for convenience

Will probably remove when macros are added
std: Add sum
std: Add read-file
std: Make divisible? work on other integer types as well
std: Add `get-contents` to read stdin until EOF

Like Haskell getContents
std: Add `lines` to iterate over string lines (\n)
std: Woops forgot to commit these a couple ago
std: Add io/then{l,r}. Same as {<<,>>} in Haskell
std: Update io/{map,bind} to work with new IO newtype
Next