(.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: Stat
     ["[1]::[0]"
      (executable? [] Bit)
      (size Int)])

   (import: File "as" RubyFile
     ["[1]::[0]"
      ("static" SEPARATOR ..String)
      ("static" open [Path ..String] "io" "try" RubyFile)
      ("static" stat [Path] "io" "try" Stat)
      ("static" delete [Path] "io" "try" Int)
      ("static" file? [Path] "io" "try" Bit)
      ("static" directory? [Path] "io" "try" Bit)

      (read [] "io" "try" Binary)
      (write [Binary] "io" "try" Int)
      (flush [] "io" "try" "?" Any)
      (close [] "io" "try" "?" Any)])])

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