From 3a8d595605ee1bb9348b97cedf6901ca2a811425 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 2 Jan 2019 21:35:12 -0400 Subject: Some minor refactoring. --- stdlib/source/lux/control/identity.lux | 15 +++++++++++---- stdlib/source/lux/io.lux | 1 + stdlib/source/lux/type/unit.lux | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/stdlib/source/lux/control/identity.lux b/stdlib/source/lux/control/identity.lux index da7445bc7..094ede9a6 100644 --- a/stdlib/source/lux/control/identity.lux +++ b/stdlib/source/lux/control/identity.lux @@ -31,12 +31,13 @@ (Capability (ID code entity storage) code))) - (type: #export (Service code storage) - [(Can-Identify code storage) - (Can-Anonymize code storage)]) + (type: #export (Service code) + (Ex [storage] + [(Can-Identify code storage) + (Can-Anonymize code storage)])) (def: Service<_> - Service + (All [code storage] (Service code storage)) [(|>> :abstraction) (|>> :representation)]) @@ -44,6 +45,12 @@ (-> (Service code storage) (scope storage))) + (def: #export (service _) + (All [code] + (Ex [storage] + (-> Any (Service code storage)))) + ..Service<_>) + (def: #export (with-identity context) (All [code scope] (Ex [storage] diff --git a/stdlib/source/lux/io.lux b/stdlib/source/lux/io.lux index 92ae11066..21d3d8f4a 100644 --- a/stdlib/source/lux/io.lux +++ b/stdlib/source/lux/io.lux @@ -1,3 +1,4 @@ +## TODO: Make IO an abstract type. (.module: {#.doc "A method for abstracting I/O and effectful computations to make it safe while writing pure functional code."} [lux #* [control diff --git a/stdlib/source/lux/type/unit.lux b/stdlib/source/lux/type/unit.lux index 6f38a02d0..d6cd4ac6b 100644 --- a/stdlib/source/lux/type/unit.lux +++ b/stdlib/source/lux/type/unit.lux @@ -1,3 +1,4 @@ +## TODO: Write tests ASAP. (.module: [lux #* [control -- cgit v1.2.3