mac-0.1.3.0: Static Mandatory Access Control in Haskell

Safe HaskellUnsafe
LanguageHaskell98

MAC.Core

Description

It defines main data structures for security, i.e., monad family MAC and labeled resources Res.

Synopsis

Documentation

newtype Res l a Source #

Labeling expressions of type a with label l.

Constructors

MkRes 

Fields

labelOf :: Res l a -> l Source #

Label of resources

newtype MAC l a Source #

This monad labels the results of the computation (of type a) with label l.

Constructors

MkMAC (IO a) 

Instances

Monad (MAC l) Source # 

Methods

(>>=) :: MAC l a -> (a -> MAC l b) -> MAC l b #

(>>) :: MAC l a -> MAC l b -> MAC l b #

return :: a -> MAC l a #

fail :: String -> MAC l a #

Functor (MAC l) Source # 

Methods

fmap :: (a -> b) -> MAC l a -> MAC l b #

(<$) :: a -> MAC l b -> MAC l a #

Applicative (MAC l) Source # 

Methods

pure :: a -> MAC l a #

(<*>) :: MAC l (a -> b) -> MAC l a -> MAC l b #

(*>) :: MAC l a -> MAC l b -> MAC l b #

(<*) :: MAC l a -> MAC l b -> MAC l a #

runMAC :: MAC l a -> IO a Source #

Execute secure computations.

ioTCB :: IO a -> MAC l a Source #

It lifts arbitrary IO-actions.