aboutsummaryrefslogtreecommitdiff
path: root/licentia/source/program/licentia/license/liability.lux
blob: 661ce8b52fc72ee18e30da017951c606a1e5d0f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
(.using
 [library
  [lux (.except)
   [data
    ["[0]" text
     ["%" format (.only format)]]]]]
 [//
  ["_" term]
  [//
   ["$" document]]])

(def: warranty_communications
  (List Text)
  (list "expressed"
        "implied"
        "statutory"))

(def: work_disclamers
  (List Text)
  (list "free of defects"
        "merchantable"
        "fit for a particular purpose"
        "non-infringing"))

(def: fixes
  (List Text)
  (list "servicing"
        "repair"
        "correction"))

(def: .public warranty
  (let [on_basics (let [applicability_escape "Unless required by applicable law or agreed to in writing"
                        work_provisioning (format _.licensor
                                                  " provides " _.licensed_work
                                                  ", and each " _.contributor
                                                  " provides its " ($.plural _.contribution))]
                    (format applicability_escape ", "
                            work_provisioning
                            " under " _.license
                            " on an " ($.quote "as is")
                            " basis, without warranty or condition of any kind, either " ($.or warranty_communications)
                            " including, without limitation, any warranties or conditions that " _.licensed_work
                            " is " ($.or work_disclamers)))
        on_distribution (format _.recipient
                                " is solely responsible for determining the appropriateness of using or redistributing " _.licensed_work)
        on_risk (format "The entire risk as to the quality and performance of " _.licensed_work
                        " is with " _.recipient)
        on_fixes (format "Should " _.licensed_work
                         " prove defective in any respect, " _.recipient
                         ", not any " _.contributor
                         ", assumes the cost of any necessary " ($.or fixes))
        on_importance (format "This disclaimer of warranty constitutes an essential part of "_.license)
        on_authorization (format "No use of "_.licensed_work
                                 " is authorized under " _.license
                                 " except under this disclaimer")]
    ($.paragraph (list on_basics
                       on_distribution
                       on_risk
                       on_fixes
                       on_importance
                       on_authorization))))

(def: damage_types
  (List Text)
  (list "direct"
        "indirect"
        "special"
        "incidental"
        "consequential"))

(def: damage_consequences
  (List Text)
  (list "lost profits"
        "loss of goodwill"
        "work stoppage"
        "computer failure or malfunction"
        "any and all other commercial damages or losses"))

(def: .public limitation
  (let [on_limit (let [exclusion "Under no circumstances and under no legal theory"
                       examples "whether tort (including negligence), contract, or otherwise"
                       applicable_law_exception "unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing"
                       renunciation (format "shall any " _.contributor
                                            " be liable to " _.recipient)
                       damage_enumeration (format "for any " ($.or damage_types) " damages of any character"
                                                  " including without limitation damages for " ($.or damage_consequences))
                       conscience "even if such party shall have been informed of the possibility of such damages"]
                   (format exclusion ", " examples ", " applicable_law_exception ", " renunciation " " damage_enumeration ", " conscience))
        on_death_exception "This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation"
        on_jurisdictions (format "Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to " _.recipient)]
    ($.paragraph (list on_limit
                       on_death_exception
                       on_jurisdictions))))

(def: .public litigation
  (let [on_jurisdiction (format "Any litigation relating to " _.license " may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business")
        on_laws "Such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions"
        on_claims "Nothing in this section shall prevent a party’s ability to bring cross-claims or counter-claims"]
    ($.paragraph (list on_jurisdiction
                       on_laws
                       on_claims))))

(def: liability_obligations
  (List Text)
  (list "support"
        "warranty"
        "indemnity"
        "other liability obligations"
        (format "rights consistent with " _.license)))

(def: .public can_accept
  (let [on_acceptance_of_liability (let [condition (format "While redistributing " _.licensed_work " or " ($.plural _.extension) " thereof")
                                         right (format _.recipient " may choose to offer, and charge a fee for, acceptance of " ($.and/or ..liability_obligations))]
                                     (format condition ", " right))
        on_responsibility (let [but "However, in accepting such obligations"
                                cannot_represent_a_contributor (format _.recipient " may not act on behalf of any other " _.contributor)
                                can_only_represent_oneself (format "only on behalf and on sole responsibility of " _.recipient)
                                each_contributor (is (-> Text Text)
                                                     (function (_ responsibility)
                                                       (format responsibility " each " _.contributor)))
                                responsibilities (is (List Text)
                                                     (list (each_contributor "indemnify")
                                                           (each_contributor "defend")
                                                           (format (each_contributor "hold") " harmless")))
                                full_responsibility_condition (format "and only if " _.recipient
                                                                      " agrees to " ($.and responsibilities)
                                                                      " for any liability incurred by, or claims asserted against, such " _.contributor
                                                                      " by reason of acceptance of any such warranty or additional liability by " _.recipient)]
                            (format but ", " cannot_represent_a_contributor ", " can_only_represent_oneself ", " full_responsibility_condition))]
    ($.paragraph (list on_acceptance_of_liability
                       on_responsibility))))

(def: .public disclaim_high_risk
  (let [on_work (let [intentions (is (List Text)
                                     (list "designed"
                                           "manufactured"
                                           "intended for use or distribution"))
                      hazardous_environments (is (List Text)
                                                 (list "nuclear facilities"
                                                       "aircraft navigation"
                                                       "communications systems"
                                                       "air traffic control"
                                                       "direct life support machines"
                                                       "weapons systems"))
                      consequences (is (List Text)
                                       (list "death"
                                             "personal injury"
                                             "severe physical damage"
                                             "environmental damage"))
                      disclaim (format _.licensed_work " is not fault tolerant"
                                       ", and is not " ($.or intentions)
                                       " as on-line control equipment in hazardous environments requiring fail-safe performance")
                      examples (format "such as in the operation of " ($.or hazardous_environments))
                      further (format "in which the failure of " _.licensed_work " could lead directly to " ($.or consequences))]
                  (format disclaim ", " examples ", " further))
        on_contributors (let [claim "any express or implied warranty of fitness for high risk activities"]
                          (format _.licensor
                                  " and every " _.contributor
                                  " specifically disclaim " claim))]
    ($.paragraph (list on_work
                       on_contributors))))