lio 0.11.6.0 → 0.11.7.0
raw patch · 5 files changed
+38/−27 lines, 5 filesdep ~basedep ~bytestringdep ~hashablePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, bytestring, hashable
API changes (from Hackage documentation)
- LIO.Error: instance GHC.Exception.Exception LIO.Error.AnyLabelError
- LIO.Error: instance GHC.Exception.Exception LIO.Error.InsufficientPrivs
- LIO.Error: instance LIO.Label.Label l => GHC.Exception.Exception (LIO.Error.LabelError l)
- LIO.Error: instance LIO.Label.Label l => GHC.Exception.Exception (LIO.Error.ResultExceedsLabel l)
- LIO.TCB: instance (GHC.Show.Show a, GHC.Show.Show l) => GHC.Show.Show (LIO.TCB.LResStatus l a)
- LIO.TCB: instance GHC.Exception.Exception LIO.TCB.UncatchableTCB
+ LIO: NoPrivs :: NoPrivs
+ LIO: canFlowTo :: Label l => l -> l -> Bool
+ LIO: canFlowToP :: PrivDesc l p => p -> l -> l -> Bool
+ LIO: class (Eq l, Show l, Read l, Typeable l) => Label l
+ LIO: class (Label l, SpeaksFor p) => PrivDesc l p
+ LIO: class (Typeable p, Show p) => SpeaksFor p
+ LIO: data NoPrivs
+ LIO: data Priv a
+ LIO: downgradeP :: PrivDesc l p => p -> l -> l
+ LIO: glb :: Label l => l -> l -> l
+ LIO: infix 4 `canFlowTo`
+ LIO: infixl 5 `glb`
+ LIO: lub :: Label l => l -> l -> l
+ LIO: noPrivs :: Priv NoPrivs
+ LIO: privDesc :: Priv a -> a
+ LIO: speaksFor :: SpeaksFor p => p -> p -> Bool
+ LIO.DCLabel: instance GHC.Base.Semigroup LIO.DCLabel.CNF
+ LIO.DCLabel: instance GHC.Base.Semigroup LIO.DCLabel.Disjunction
+ LIO.Error: instance GHC.Exception.Type.Exception LIO.Error.AnyLabelError
+ LIO.Error: instance GHC.Exception.Type.Exception LIO.Error.InsufficientPrivs
+ LIO.Error: instance LIO.Label.Label l => GHC.Exception.Type.Exception (LIO.Error.LabelError l)
+ LIO.Error: instance LIO.Label.Label l => GHC.Exception.Type.Exception (LIO.Error.ResultExceedsLabel l)
+ LIO.Label: infix 4 `speaksFor`
+ LIO.Label: infixl 5 `glb`
+ LIO.Label: instance GHC.Base.Semigroup LIO.Label.NoPrivs
+ LIO.TCB: instance (GHC.Show.Show l, GHC.Show.Show a) => GHC.Show.Show (LIO.TCB.LResStatus l a)
+ LIO.TCB: instance GHC.Base.Semigroup p => GHC.Base.Semigroup (LIO.TCB.Priv p)
+ LIO.TCB: instance GHC.Exception.Type.Exception LIO.TCB.UncatchableTCB
- LIO.Delegate: delegate :: (SpeaksFor p) => Priv p -> p -> Priv p
+ LIO.Delegate: delegate :: SpeaksFor p => Priv p -> p -> Priv p
- LIO.Delegate: guardGate :: (SpeaksFor p) => String -> p -> a -> Gate p a
+ LIO.Delegate: guardGate :: SpeaksFor p => String -> p -> a -> Gate p a
- LIO.Error: insufficientPrivs :: (SpeaksFor p) => String -> p -> p -> a
+ LIO.Error: insufficientPrivs :: SpeaksFor p => String -> p -> p -> a
- LIO.Error: labelError :: (Label l) => String -> [l] -> LIO l a
+ LIO.Error: labelError :: Label l => String -> [l] -> LIO l a
- LIO.Error: lerrFromException :: (Exception e) => SomeException -> Maybe e
+ LIO.Error: lerrFromException :: Exception e => SomeException -> Maybe e
- LIO.Exception: [SomeException] :: SomeException
+ LIO.Exception: [SomeException] :: forall e. Exception e => e -> SomeException
- LIO.Exception: class (Typeable * e, Show e) => Exception e
+ LIO.Exception: class (Typeable e, Show e) => Exception e
- LIO.Exception: data SomeException :: *
+ LIO.Exception: data SomeException
- LIO.Label: class (Label l, SpeaksFor p) => PrivDesc l p where canFlowToP p l1 l2 = downgradeP p l1 `canFlowTo` l2
+ LIO.Label: class (Label l, SpeaksFor p) => PrivDesc l p
- LIO.Label: isPriv :: (Typeable p) => p -> Bool
+ LIO.Label: isPriv :: Typeable p => p -> Bool
- LIO.Run: privInit :: (SpeaksFor p) => p -> IO (Priv p)
+ LIO.Run: privInit :: SpeaksFor p => p -> IO (Priv p)
- LIO.TCB: LabeledResultTCB :: !ThreadId -> !l -> !(MVar ()) -> !(IORef (LResStatus l a)) -> LabeledResult l a
+ LIO.TCB: LabeledResultTCB :: !ThreadId -> !l -> !MVar () -> !IORef (LResStatus l a) -> LabeledResult l a
- LIO.TCB: [lresBlockTCB] :: LabeledResult l a -> !(MVar ())
+ LIO.TCB: [lresBlockTCB] :: LabeledResult l a -> !MVar ()
- LIO.TCB: [lresStatusTCB] :: LabeledResult l a -> !(IORef (LResStatus l a))
+ LIO.TCB: [lresStatusTCB] :: LabeledResult l a -> !IORef (LResStatus l a)
- LIO.TCB.LObj: blessPTCB :: (GuardIO l io lio, PrivDesc l p) => String -> (a -> io) -> Priv p -> (LObj l a) -> lio
+ LIO.TCB.LObj: blessPTCB :: (GuardIO l io lio, PrivDesc l p) => String -> (a -> io) -> Priv p -> LObj l a -> lio
- LIO.TCB.LObj: blessReadOnlyPTCB :: (GuardIO l io lio, PrivDesc l p) => String -> (a -> io) -> Priv p -> (LObj l a) -> lio
+ LIO.TCB.LObj: blessReadOnlyPTCB :: (GuardIO l io lio, PrivDesc l p) => String -> (a -> io) -> Priv p -> LObj l a -> lio
- LIO.TCB.LObj: blessReadOnlyTCB :: (GuardIO l io lio, Label l) => String -> (a -> io) -> (LObj l a) -> lio
+ LIO.TCB.LObj: blessReadOnlyTCB :: (GuardIO l io lio, Label l) => String -> (a -> io) -> LObj l a -> lio
- LIO.TCB.LObj: blessTCB :: (GuardIO l io lio, Label l) => String -> (a -> io) -> (LObj l a) -> lio
+ LIO.TCB.LObj: blessTCB :: (GuardIO l io lio, Label l) => String -> (a -> io) -> LObj l a -> lio
- LIO.TCB.LObj: blessWriteOnlyPTCB :: (GuardIO l io lio, PrivDesc l p) => String -> (a -> io) -> Priv p -> (LObj l a) -> lio
+ LIO.TCB.LObj: blessWriteOnlyPTCB :: (GuardIO l io lio, PrivDesc l p) => String -> (a -> io) -> Priv p -> LObj l a -> lio
- LIO.TCB.LObj: blessWriteOnlyTCB :: (GuardIO l io lio, Label l) => String -> (a -> io) -> (LObj l a) -> lio
+ LIO.TCB.LObj: blessWriteOnlyTCB :: (GuardIO l io lio, Label l) => String -> (a -> io) -> LObj l a -> lio
- LIO.TCB.LObj: guardIOTCB :: GuardIO l io lio => (LIO l ()) -> io -> lio
+ LIO.TCB.LObj: guardIOTCB :: GuardIO l io lio => LIO l () -> io -> lio
- LIO.TCB.MLObj: MLObjTCB :: !(MLabel policy l) -> !object -> MLObj policy l object
+ LIO.TCB.MLObj: MLObjTCB :: !MLabel policy l -> !object -> MLObj policy l object
- LIO.TCB.MLObj: MLabelTCB :: !l -> !(IORef l) -> !(MVar (Map Unique (l -> IO Bool))) -> policy -> MLabel policy l
+ LIO.TCB.MLObj: MLabelTCB :: !l -> !IORef l -> !MVar (Map Unique (l -> IO Bool)) -> policy -> MLabel policy l
- LIO.TCB.MLObj: [mlLabel] :: MLabel policy l -> !(IORef l)
+ LIO.TCB.MLObj: [mlLabel] :: MLabel policy l -> !IORef l
- LIO.TCB.MLObj: [mlUsers] :: MLabel policy l -> !(MVar (Map Unique (l -> IO Bool)))
+ LIO.TCB.MLObj: [mlUsers] :: MLabel policy l -> !MVar (Map Unique (l -> IO Bool))
- LIO.TCB.MLObj: mlObjTCB :: (MLabelPolicyDefault policy) => l -> l -> a -> LIO l (MLObj policy l a)
+ LIO.TCB.MLObj: mlObjTCB :: MLabelPolicyDefault policy => l -> l -> a -> LIO l (MLObj policy l a)
- LIO.TCB.MLObj: newMLabelP :: (PrivDesc l p) => Priv p -> policy -> l -> l -> LIO l (MLabel policy l)
+ LIO.TCB.MLObj: newMLabelP :: PrivDesc l p => Priv p -> policy -> l -> l -> LIO l (MLabel policy l)
- LIO.TCB.MLObj: readMLabelP :: (PrivDesc l p) => Priv p -> MLabel policy l -> LIO l l
+ LIO.TCB.MLObj: readMLabelP :: PrivDesc l p => Priv p -> MLabel policy l -> LIO l l
- LIO.TCB.MLObj: withMLabelP :: (PrivDesc l p) => Priv p -> MLabel policy l -> LIO l a -> LIO l a
+ LIO.TCB.MLObj: withMLabelP :: PrivDesc l p => Priv p -> MLabel policy l -> LIO l a -> LIO l a
Files
- LICENSE +16/−14
- LIO/DCLabel.hs +6/−2
- LIO/Label.hs +5/−3
- LIO/TCB.hs +3/−2
- lio.cabal +8/−6
LICENSE view
@@ -1,17 +1,19 @@-This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License as-published by the Free Software Foundation; either version 2, or (at-your option) any later version.--This program is distributed in the hope that it will be useful, but-WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-General Public License for more details.+Copyright 2017 Deian Stefan -You can obtain copies of permitted licenses from these URLs:+Permission is hereby granted, free of charge, to any person obtaining a copy of+this software and associated documentation files (the "Software"), to deal in+the Software without restriction, including without limitation the rights to+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies+of the Software, and to permit persons to whom the Software is furnished to do+so, subject to the following conditions: - http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt- http://www.gnu.org/licenses/gpl-3.0.txt+The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software. -or by writing to the Free Software Foundation, Inc., 59 Temple Place,-Suite 330, Boston, MA 02111-1307 USA+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
LIO/DCLabel.hs view
@@ -218,9 +218,11 @@ next' = ((:) <$> readPrec) `ap` next dFromList <$> next' +instance Semigroup Disjunction where+ (<>) = dUnion+ instance Monoid Disjunction where mempty = dFalse- mappend = dUnion dFalse :: Disjunction dFalse = Disjunction Set.empty 0@@ -276,9 +278,11 @@ next' = ((:) <$> readPrec) `ap` next cFromList <$> next' +instance Semigroup CNF where+ (<>) = cUnion+ instance Monoid CNF where mempty = cTrue- mappend = cUnion -- | A 'CNF' that is always @True@--i.e., trivially satisfiable. When -- @'dcSecrecy' = cTrue@, it means data is public. When
LIO/Label.hs view
@@ -267,11 +267,13 @@ -- 'canFlowToP' 'NoPrivs' is the same as 'canFlowTo'. instance Label l => PrivDesc l NoPrivs where downgradeP _ l = l +instance Semigroup NoPrivs where+ _ <> _ = NoPrivs+ instance Monoid NoPrivs where- mempty = NoPrivs- mappend _ _ = NoPrivs+ mempty = NoPrivs + -- | 'Priv' object corresponding to 'NoPrivs'. noPrivs :: Priv NoPrivs noPrivs = PrivTCB NoPrivs-
LIO/TCB.hs view
@@ -154,10 +154,11 @@ -- before running your 'LIO' computation. newtype Priv a = PrivTCB a deriving (Show, Eq, Typeable) +instance Semigroup p => Semigroup (Priv p) where+ (PrivTCB m1) <> (PrivTCB m2) = PrivTCB $ m1 <> m2+ instance Monoid p => Monoid (Priv p) where mempty = PrivTCB mempty- {-# INLINE mappend #-}- mappend (PrivTCB m1) (PrivTCB m2) = PrivTCB $ m1 `mappend` m2 {-# INLINE mconcat #-} mconcat ps = PrivTCB $ mconcat $ map (\(PrivTCB p) -> p) ps
lio.cabal view
@@ -1,8 +1,8 @@ Name: lio-Version: 0.11.6.0-Cabal-Version: >= 1.8+Version: 0.11.7.0+Cabal-Version: 1.12 Build-type: Simple-License: GPL+License: MIT License-File: LICENSE Author: Hails team Maintainer: Deian Stefan <deian at cs dot ucsd dot edu>@@ -66,10 +66,12 @@ Library Build-Depends:- base >= 4.5 && < 6.0+ base >= 4.7 && < 6.0 ,containers- ,bytestring >= 0.10- ,hashable >= 1.2+ ,bytestring+ ,hashable++ Default-Language: Haskell2010 GHC-options: -Wall -fno-warn-orphans include-dirs: LIO/TCB