(.using
  [library
   [lux {"-" local}
    ["$" documentation {"+" documentation:}]
    [data
     [text {"+" \n}
      ["%" format {"+" format}]]]
    [macro
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

(documentation: (/.Writer log value)
  "Represents a value with an associated 'log' to record arbitrary information.")

(documentation: /.write
  "Write a value to the log."
  [(write message)])

(documentation: /.with
  "Enhances a monad with Writer functionality."
  [(with monoid monad)])

(documentation: /.lifted
  "Wraps a monadic value with Writer machinery."
  [(lifted monoid monad)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Writer
             ..write
             ..with
             ..lifted
             ($.default /.functor)
             ($.default /.apply)
             ($.default /.monad)]
            []))
