aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorEduardo Julian2018-12-09 17:11:38 -0400
committerEduardo Julian2018-12-09 17:11:38 -0400
commit93ac89e2f8a47e412dcb6b6944c5e39b3ea073f0 (patch)
treedee7bd196e74d70da947bb3e1ce9fdb09700ed69 /stdlib
parent9f07e772cd9758ca5f4c516e78d50a1db581c910 (diff)
Added some missing/necessary documentation.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/control/security/capability.lux2
-rw-r--r--stdlib/source/lux/control/security/privacy.lux6
-rw-r--r--stdlib/source/lux/control/security/taint.lux6
3 files changed, 14 insertions, 0 deletions
diff --git a/stdlib/source/lux/control/security/capability.lux b/stdlib/source/lux/control/security/capability.lux
index 572b52f3b..2a964bfe8 100644
--- a/stdlib/source/lux/control/security/capability.lux
+++ b/stdlib/source/lux/control/security/capability.lux
@@ -2,5 +2,7 @@
[lux #*])
(signature: #export (Capability input output)
+ {#.doc (doc "Represents the capability to perform an operation."
+ "This operation is assumed to have security implications.")}
(: (-> input output)
perform))
diff --git a/stdlib/source/lux/control/security/privacy.lux b/stdlib/source/lux/control/security/privacy.lux
index ad85ae679..100b76b17 100644
--- a/stdlib/source/lux/control/security/privacy.lux
+++ b/stdlib/source/lux/control/security/privacy.lux
@@ -20,12 +20,15 @@
value
(type: #export (Close label)
+ {#.doc (doc "Represents the capacity to 'privatize' a value.")}
(All [value] (-> value (Private value label))))
(type: #export (Open label)
+ {#.doc (doc "Represents the capacity to 'publicize' a value.")}
(All [value] (-> (Private value label) value)))
(signature: #export (Privilege label)
+ {#.doc (doc "Represents the privilege to both 'privatize' and 'publicize' a value.")}
(: (Close label)
conceal)
@@ -38,13 +41,16 @@
(def: reveal (|>> :representation))))
(type: #export (Delegation from to)
+ {#.doc (doc "Represents the act of delegating privatization capacities.")}
(All [value] (-> (Private value from) (Private value to))))
(def: #export (delegation open close)
+ {#.doc (doc "Delegating privatization capacities.")}
(All [from to] (-> (Open from) (Close to) (Delegation from to)))
(|>> open close))
(type: #export (Context scope label)
+ {#.doc (doc "A computational context with an associated privacy privilege.")}
(-> (Privilege label)
(scope label)))
diff --git a/stdlib/source/lux/control/security/taint.lux b/stdlib/source/lux/control/security/taint.lux
index afdc1904c..9234baa97 100644
--- a/stdlib/source/lux/control/security/taint.lux
+++ b/stdlib/source/lux/control/security/taint.lux
@@ -10,17 +10,23 @@
abstract]])
(abstract: #export (Dirty a)
+ {#.doc (doc "A value which is considered untrustworthy due to its origin.")}
+
a
(def: #export taint
+ {#.doc (doc "Mark a value as dirty/untrustworthy.")}
(All [a] (-> a (Dirty a)))
(|>> :abstraction))
(def: #export (validate validator dirty)
+ {#.doc (doc "Test a dirty/untrustworthy value."
+ "Potentially produces a 'clean' value.")}
(All [a b] (-> (-> a (Error b)) (Dirty a) (Error b)))
(validator (:representation dirty)))
(def: #export trust
+ {#.doc (doc "Trusts a (previously thought as) dirty/untrustworthy value.")}
(All [a] (-> (Dirty a) a))
(|>> :representation))