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

add ConfidentialShowable class for things holding secrets

parent 784fd5bf
No related branches found
No related tags found
1 merge request!2add ConfidentialShowable class for things holding secrets
Pipeline #4741 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
import: warnings
-- 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.
-- other-modules:
......@@ -73,7 +75,9 @@ library
-- other-extensions:
-- Other library packages from which modules are imported.
build-depends: base ^>=4.14.3.0
build-depends:
, base
, text
-- Directories containing source files.
hs-source-dirs: src
......@@ -105,5 +109,5 @@ test-suite tahoe-capabilities-test
-- Test dependencies.
build-depends:
, base ^>=4.14.3.0
, base
, 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