Skip to content
Snippets Groups Projects
Commit f0a11218 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Merge branch 'confidential-showable' into 'main'

add ConfidentialShowable class for things holding secrets

See merge request !2
parents 784fd5bf cf4f7215
No related branches found
No related tags found
1 merge request!2add ConfidentialShowable class for things holding secrets
Pipeline #4742 passed
module Tahoe.Capability where module Tahoe.Capability (
module Tahoe.Capability.Internal.Confidential,
) where
import Tahoe.Capability.Internal.Confidential (ConfidentialShowable (..))
module Tahoe.Capability.Internal.Confidential where
import qualified Data.Text as T
{- | Something which contains confidential information and can be rendered as
text such that the text also includes confidential information. It is
expected (but not required) that such types will also have a Show instance
which obscures the confidential information.
-}
class ConfidentialShowable s where
-- | Show the value, including any confidential information.
confidentiallyShow :: s -> T.Text
...@@ -64,7 +64,9 @@ library ...@@ -64,7 +64,9 @@ library
import: warnings import: warnings
-- Modules exported by the library. -- Modules exported by the library.
exposed-modules: Tahoe.Capability exposed-modules:
Tahoe.Capability
Tahoe.Capability.Internal.Confidential
-- Modules included in this library but not exported. -- Modules included in this library but not exported.
-- other-modules: -- other-modules:
...@@ -73,7 +75,9 @@ library ...@@ -73,7 +75,9 @@ library
-- other-extensions: -- other-extensions:
-- Other library packages from which modules are imported. -- Other library packages from which modules are imported.
build-depends: base ^>=4.14.3.0 build-depends:
, base
, text
-- Directories containing source files. -- Directories containing source files.
hs-source-dirs: src hs-source-dirs: src
...@@ -105,5 +109,5 @@ test-suite tahoe-capabilities-test ...@@ -105,5 +109,5 @@ test-suite tahoe-capabilities-test
-- Test dependencies. -- Test dependencies.
build-depends: build-depends:
, base ^>=4.14.3.0 , base
, tahoe-capabilities , tahoe-capabilities
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment