From f621a133e6e0a516c0586270fea8eaffb4829d82 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 8 Aug 2021 17:56:15 -0400 Subject: No more #export magic syntax. --- .../library/lux/control/security/capability.lux | 12 +++---- .../source/library/lux/control/security/policy.lux | 38 +++++++++++----------- 2 files changed, 25 insertions(+), 25 deletions(-) (limited to 'stdlib/source/library/lux/control/security') diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index b58468911..4834e172c 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -24,19 +24,19 @@ ["|.|" declaration] ["|.|" annotations]]]]]) -(abstract: #export (Capability brand input output) - (-> input output) - +(abstract: .public (Capability brand input output) {#.doc (doc "Represents the capability to perform an operation." "This operation is assumed to have security implications.")} + (-> input output) + (def: forge (All [brand input output] (-> (-> input output) (Capability brand input output))) (|>> :abstraction)) - (def: #export (use capability input) + (def: .public (use capability input) {#.doc (doc "Applies a capability against its required input.")} (All [brand input output] (-> (Capability brand input output) @@ -44,7 +44,7 @@ output)) ((:representation capability) input)) - (syntax: #export (capability: {export |export|.parser} + (syntax: .public (capability: {export |export|.parser} {declaration |declaration|.parser} {annotations (<>.maybe |annotations|.parser)} {[forge input output] (.form ($_ <>.and .local_identifier .any .any))}) @@ -74,7 +74,7 @@ (~! ..forge))) )))) - (def: #export (async capability) + (def: .public (async capability) {#.doc (doc "Converts a synchronous I/O-based capability into an asynchronous capability.")} (All [brand input output] (-> (Capability brand input (IO output)) diff --git a/stdlib/source/library/lux/control/security/policy.lux b/stdlib/source/library/lux/control/security/policy.lux index dc5a07e0d..32bf06c38 100644 --- a/stdlib/source/library/lux/control/security/policy.lux +++ b/stdlib/source/library/lux/control/security/policy.lux @@ -8,38 +8,38 @@ [type abstract]]]) -(abstract: #export (Policy brand value label) - value - +(abstract: .public (Policy brand value label) {#.doc (doc "A security policy encoded as the means to 'upgrade' or 'downgrade' in a secure context.")} - (type: #export (Can_Upgrade brand label value) + value + + (type: .public (Can_Upgrade brand label value) {#.doc (doc "Represents the capacity to 'upgrade' a value.")} (-> value (Policy brand value label))) - (type: #export (Can_Downgrade brand label value) + (type: .public (Can_Downgrade brand label value) {#.doc (doc "Represents the capacity to 'downgrade' a value.")} (-> (Policy brand value label) value)) - (type: #export (Privilege brand label) + (type: .public (Privilege brand label) {#.doc (doc "Represents the privilege to both 'upgrade' and 'downgrade' a value.")} {#can_upgrade (Can_Upgrade brand label) #can_downgrade (Can_Downgrade brand label)}) - (type: #export (Delegation brand from to) + (type: .public (Delegation brand from to) {#.doc (doc "Represents the act of delegating policy capacities.")} (All [value] (-> (Policy brand value from) (Policy brand value to)))) - (def: #export (delegation downgrade upgrade) + (def: .public (delegation downgrade upgrade) {#.doc (doc "Delegating policy capacities.")} (All [brand from to] (-> (Can_Downgrade brand from) (Can_Upgrade brand to) (Delegation brand from to))) (|>> downgrade upgrade)) - (type: #export (Context brand scope label) + (type: .public (Context brand scope label) {#.doc (doc "A computational context with an associated policy privilege.")} (-> (Privilege brand label) (scope label))) @@ -49,7 +49,7 @@ {#can_upgrade (|>> :abstraction) #can_downgrade (|>> :representation)}) - (def: #export (with_policy context) + (def: .public (with_policy context) {#.doc (doc "Activates a security context with the priviledge to enforce it's policy." (type: Password @@ -82,13 +82,13 @@ (type (All [brand label] (constructor (All [value] (Policy brand value label)))))) - (implementation: #export functor + (implementation: .public functor (:~ (..of_policy Functor)) (def: (map f fa) (|> fa :representation f :abstraction))) - (implementation: #export apply + (implementation: .public apply (:~ (..of_policy Apply)) (def: &functor ..functor) @@ -96,7 +96,7 @@ (def: (apply ff fa) (:abstraction ((:representation ff) (:representation fa))))) - (implementation: #export monad + (implementation: .public monad (:~ (..of_policy Monad)) (def: &functor ..functor) @@ -105,18 +105,18 @@ ) (template [ ] - [(abstract: #export - Any - + [(abstract: .public {#.doc } - (type: #export + Any + + (type: .public (Policy )) - (type: #export + (type: .public (Can_Upgrade )) - (type: #export + (type: .public (Can_Downgrade )) )] -- cgit v1.2.3