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

(documentation: /.import:
  "Easily import types, methods, functions and constants."
  [(import: (os/getenv [..String] "io" "?" ..String))])

(documentation: /.closure
  (format "Allows defining closures/anonymous-functions in the form that Lua expects."
          \n "This is useful for adapting Lux functions for usage by Lua code.")
  [(: ..Function
      (closure [left right]
               (do_something (:as Foo left) (:as Bar right))))])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..import:
             ..closure
             ($.default (/.Object brand))
             ($.default /.Nil)
             ($.default /.Function)
             ($.default /.Table)
             ($.default /.Boolean)
             ($.default /.Integer)
             ($.default /.Float)
             ($.default /.String)]
            []))
