seclib-1.1.0.1: A simple library for static information-flow security in Haskell

Safe HaskellTrustworthy
LanguageHaskell98

SecLib.Ref

Contents

Description

It provides a secure interface for manipulation of references.

Synopsis

Secure references

data Ref l a Source

Secure references

Operations

newRefSecIO :: a -> SecIO l (Ref l' a) Source

It creates a new reference. There is no relation between l and l' since creating a reference is not an observable event inside the SecIO monad.

readRefSecIO :: Ref l a -> SecIO l' (Sec l a) Source

As above, there is no relation between l and l'. Bare in mind that reading a reference is not an observable event inside the SecIO monad.

writeRefSecIO :: Ref l a -> a -> SecIO l () Source

It writes references only at the security level indicated by the argument of the SecIO monad.