faceted-0.0.2.0: Faceted computation for dynamic information flow security

Safe HaskellSafe-Inferred

Data.Faceted

Synopsis

Documentation

type Label = StringSource

A security label is any string. Labels need not be secrets; they may be readable strings. Information flow security is ensured by a combination of the type system and dynamic checks.

data Faceted a Source

Type 'Faceted a' represents (possibly) faceted values.

? x : y ====> Faceted k x y

Instances

Monad Faceted

Monad: Like applicative, but even more powerful. Faceted the free monad over the function 'Facets a = F Label a a'.

Functor Faceted

Functor: For when the function is pure but the argument has facets.

Typeable1 Faceted 
Applicative Faceted

Applicative: For when the function and argument both have facets.

Eq a => Eq (Faceted a) 
Show a => Show (Faceted a) 

makePrivate :: Label -> a -> Faceted aSource

? x : bottom ====> makePrivate k x

makePublic :: a -> Faceted aSource

x ==> Raw x ===> makePublic x

data FIORef a Source

Variables of type 'FIORef a' are faceted IORefs

newFIORef :: Faceted a -> FIO (FIORef a)Source

Allocate a new FIORef

readFIORef :: FIORef a -> FIO (Faceted a)Source

Read an FIORef

writeFIORef :: FIORef a -> Faceted a -> FIO ()Source

Write an FIORef

type View = [Label]Source

A _view_ is any set of labels. In enforcing information flow security Each view may see a different value.

data FHandle Source

Facet-aware file handles