... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\injection]]
    [collection
     ["[0]" list]]]]]
 ["[0]" \\projection]
 [\\library
  ["[0]" /]])

(the \\projection
  (List $.Documentation)
  (list ($.module \\projection._
                  "")

        ($.definition \\projection.unknown_property)
        
        ($.definition \\projection.Property
          "A property in the environment.")

        ($.definition \\projection.Environment
          "An abstraction for environment variables of a program.")

        ($.definition (\\projection.Projection it)
          "A projection of environment variables of a program.")

        ($.definition \\projection.empty
          "An empty environment.")

        ($.definition \\projection.property
          ""
          ($.example (' (property name))))

        ($.definition \\projection.value
          (%.message "Executes a projection against the given environment variables."
                     \n "Does not check whether all environment variables were parsed, since they're usually an open set.")
          ($.example (' (value projection environment))))
        ))

(the .public documentation
  (List $.Documentation)
  (list.partial ($.module /._
                          "")

                ($.definition /.unknown_environment_variable)
                ($.definition /.async)
                ($.definition /.default)

                ($.definition (/.Environment !)
                  "Access to ambient environment data and the capacity to exit the program.")

                ($.definition /.environment
                  "Assembles the environment variables available to the program."
                  ($.example (' (environment monad program))))

                ($.definition /.mock
                  ""
                  ($.example (' (mock environment home directory))))

                ..\\projection
                ))
