uni-util 2.2.0.0 → 2.2.1.0
raw patch · 9 files changed
+48/−60 lines, 9 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Util.AtomString: instance [overlap ok] (StringClass stringClass) => QuickRead stringClass
- Util.AtomString: instance [overlap ok] (StringClass stringClass) => QuickShow stringClass
- Util.BinaryExtras: instance (Monad m) => HasBinary ClockTime m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary () m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary (Bytes, Int) m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary Bool m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary CSize m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary Char m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary CodedList m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary Int m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary Int32 m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary Integer m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary Word m
- Util.BinaryInstances: instance [overlap ok] (Monad m) => HasBinary Word32 m
- Util.BinaryUtils: instance (Functor m) => Functor (ArgMonad arg m)
- Util.BinaryUtils: instance (Monad m) => Monad (ArgMonad arg m)
- Util.BinaryUtils: instance (MonadIO m) => MonadIO (ArgMonad arg m)
- Util.Computation: instance (Monad m) => Monad (MonadWithError m)
- Util.DeepSeq: instance (DeepSeq a) => DeepSeq (Maybe a)
- Util.DeepSeq: instance (DeepSeq a) => DeepSeq [a]
- Util.Huffman: instance (Show a) => Show (PointedList a)
- Util.ICStringLen: instance (MonadIO m) => HasBinary ICStringLen m
- Util.KeyedChanges: instance (Ord key) => HasSource (KeyedChanges key delta) [delta] delta
- Util.LineShow: instance (Read a) => Read (LineShow a)
- Util.LineShow: instance (Show a) => Show (LineShow a)
- Util.Myers: instance (Show v) => Show (DiffElement v)
- Util.Queue: instance (Eq a) => Eq (Queue a)
- Util.Registry: instance (GetSetRegistry (registry from Dyn) from Dyn) => GetSetRegistryDyn (Untyped registry from) from
- Util.Registry: instance (GetSetRegistry (registry from Obj) from Obj) => GetSetRegistry (Unsafe registry from) from to
- Util.Registry: instance (KeyOpsRegistry (registry from Dyn) from) => KeyOpsRegistry (Untyped registry from) from
- Util.Registry: instance (KeyOpsRegistry (registry from Obj) from) => KeyOpsRegistry (Unsafe registry from) from
- Util.Registry: instance (NewRegistry (registry from Dyn)) => NewRegistry (Untyped registry from)
- Util.Registry: instance (NewRegistry (registry from Obj)) => NewRegistry (Unsafe registry from)
- Util.Registry: instance (Ord from) => GetSetRegistry (LockedRegistry from to) from to
- Util.Registry: instance (Ord from) => GetSetRegistry (Registry from to) from to
- Util.Registry: instance (Ord from) => KeyOpsRegistry (LockedRegistry from to) from
- Util.Registry: instance (Ord from) => KeyOpsRegistry (Registry from to) from
- Util.Registry: instance (Ord from) => ListRegistryContents Registry from to
- Util.Registry: instance (Ord from) => NewRegistry (LockedRegistry from to)
- Util.Registry: instance (Ord from) => NewRegistry (Registry from to)
- Util.Sources: instance (HasSource hasSource x d) => CanAddSinks hasSource x d
- Util.VariableMap: instance (Ord key) => HasSource (VariableMap key elt) (VariableMapData key elt) (VariableMapUpdate key elt)
- Util.VariableMap: instance (Ord key) => HasSource (VariableMapSet key elt element) [element] (VariableSetUpdate element)
- Util.VariableSet: instance (HasKey x key) => Eq (Keyed x)
- Util.VariableSet: instance (HasKey x key) => HasSource (VariableSet x) [x] (VariableSetUpdate x)
- Util.VariableSet: instance (HasKey x key) => Ord (Keyed x)
+ Util.AtomString: instance [overlap ok] StringClass stringClass => QuickRead stringClass
+ Util.AtomString: instance [overlap ok] StringClass stringClass => QuickShow stringClass
+ Util.BinaryExtras: instance Monad m => HasBinary ClockTime m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary () m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary (Bytes, Int) m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary Bool m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary CSize m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary Char m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary CodedList m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary Int m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary Int32 m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary Integer m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary Word m
+ Util.BinaryInstances: instance [overlap ok] Monad m => HasBinary Word32 m
+ Util.BinaryUtils: instance Functor m => Functor (ArgMonad arg m)
+ Util.BinaryUtils: instance Monad m => Monad (ArgMonad arg m)
+ Util.BinaryUtils: instance MonadIO m => MonadIO (ArgMonad arg m)
+ Util.Computation: instance Monad m => Monad (MonadWithError m)
+ Util.DeepSeq: instance DeepSeq a => DeepSeq (Maybe a)
+ Util.DeepSeq: instance DeepSeq a => DeepSeq [a]
+ Util.Huffman: instance Show a => Show (PointedList a)
+ Util.ICStringLen: instance MonadIO m => HasBinary ICStringLen m
+ Util.KeyedChanges: instance Ord key => HasSource (KeyedChanges key delta) [delta] delta
+ Util.LineShow: instance Read a => Read (LineShow a)
+ Util.LineShow: instance Show a => Show (LineShow a)
+ Util.Myers: instance Show v => Show (DiffElement v)
+ Util.Queue: instance Eq a => Eq (Queue a)
+ Util.Registry: instance GetSetRegistry (registry from Dyn) from Dyn => GetSetRegistryDyn (Untyped registry from) from
+ Util.Registry: instance GetSetRegistry (registry from Obj) from Obj => GetSetRegistry (Unsafe registry from) from to
+ Util.Registry: instance KeyOpsRegistry (registry from Dyn) from => KeyOpsRegistry (Untyped registry from) from
+ Util.Registry: instance KeyOpsRegistry (registry from Obj) from => KeyOpsRegistry (Unsafe registry from) from
+ Util.Registry: instance NewRegistry (registry from Dyn) => NewRegistry (Untyped registry from)
+ Util.Registry: instance NewRegistry (registry from Obj) => NewRegistry (Unsafe registry from)
+ Util.Registry: instance Ord from => GetSetRegistry (LockedRegistry from to) from to
+ Util.Registry: instance Ord from => GetSetRegistry (Registry from to) from to
+ Util.Registry: instance Ord from => KeyOpsRegistry (LockedRegistry from to) from
+ Util.Registry: instance Ord from => KeyOpsRegistry (Registry from to) from
+ Util.Registry: instance Ord from => ListRegistryContents Registry from to
+ Util.Registry: instance Ord from => NewRegistry (LockedRegistry from to)
+ Util.Registry: instance Ord from => NewRegistry (Registry from to)
+ Util.Sources: instance HasSource hasSource x d => CanAddSinks hasSource x d
+ Util.VariableMap: instance Ord key => HasSource (VariableMap key elt) (VariableMapData key elt) (VariableMapUpdate key elt)
+ Util.VariableMap: instance Ord key => HasSource (VariableMapSet key elt element) [element] (VariableSetUpdate element)
+ Util.VariableSet: instance HasKey x key => Eq (Keyed x)
+ Util.VariableSet: instance HasKey x key => HasSource (VariableSet x) [x] (VariableSetUpdate x)
+ Util.VariableSet: instance HasKey x key => Ord (Keyed x)
- Util.AtomString: fromString :: (StringClass stringClass) => String -> stringClass
+ Util.AtomString: fromString :: StringClass stringClass => String -> stringClass
- Util.AtomString: fromStringWE :: (StringClass stringClass) => String -> WithError stringClass
+ Util.AtomString: fromStringWE :: StringClass stringClass => String -> WithError stringClass
- Util.AtomString: toString :: (StringClass stringClass) => stringClass -> String
+ Util.AtomString: toString :: StringClass stringClass => stringClass -> String
- Util.Binary: hRead :: (HasBinary a IO) => Handle -> IO a
+ Util.Binary: hRead :: HasBinary a IO => Handle -> IO a
- Util.Binary: hWrite :: (HasBinary a IO) => Handle -> a -> IO ()
+ Util.Binary: hWrite :: HasBinary a IO => Handle -> a -> IO ()
- Util.Binary: readBin :: (HasBinary a m) => ReadBinary m -> m a
+ Util.Binary: readBin :: HasBinary a m => ReadBinary m -> m a
- Util.Binary: readFromBytes :: (HasBinary a StateBinArea) => (Bytes, Int) -> IO a
+ Util.Binary: readFromBytes :: HasBinary a StateBinArea => (Bytes, Int) -> IO a
- Util.Binary: writeBin :: (HasBinary a m) => WriteBinary m -> a -> m ()
+ Util.Binary: writeBin :: HasBinary a m => WriteBinary m -> a -> m ()
- Util.Binary: writeToBytes :: (HasBinary a StateBinArea) => a -> IO (Bytes, Int)
+ Util.Binary: writeToBytes :: HasBinary a StateBinArea => a -> IO (Bytes, Int)
- Util.Binary: writeToBytes0 :: (HasBinary a StateBinArea) => Int -> a -> IO (Bytes, Int)
+ Util.Binary: writeToBytes0 :: HasBinary a StateBinArea => Int -> a -> IO (Bytes, Int)
- Util.BinaryExtras: hReadLtd :: (HasBinary a IO) => Int -> Handle -> IO (WithError a)
+ Util.BinaryExtras: hReadLtd :: HasBinary a IO => Int -> Handle -> IO (WithError a)
- Util.BinaryInstances: unWrap :: (HasWrapper wrapper m) => wrapper -> UnWrap m
+ Util.BinaryInstances: unWrap :: HasWrapper wrapper m => wrapper -> UnWrap m
- Util.BinaryInstances: wrap0 :: (Monad m) => Byte -> wrapper -> Wrap wrapper m
+ Util.BinaryInstances: wrap0 :: Monad m => Byte -> wrapper -> Wrap wrapper m
- Util.BinaryInstances: wrap1 :: (HasBinary val m) => Byte -> (val -> wrapper) -> Wrap wrapper m
+ Util.BinaryInstances: wrap1 :: HasBinary val m => Byte -> (val -> wrapper) -> Wrap wrapper m
- Util.BinaryInstances: wrap2 :: (HasBinary (val1, val2) m) => Byte -> (val1 -> val2 -> wrapper) -> Wrap wrapper m
+ Util.BinaryInstances: wrap2 :: HasBinary (val1, val2) m => Byte -> (val1 -> val2 -> wrapper) -> Wrap wrapper m
- Util.BinaryInstances: wrap3 :: (HasBinary (val1, val2, val3) m) => Byte -> (val1 -> val2 -> val3 -> wrapper) -> Wrap wrapper m
+ Util.BinaryInstances: wrap3 :: HasBinary (val1, val2, val3) m => Byte -> (val1 -> val2 -> val3 -> wrapper) -> Wrap wrapper m
- Util.BinaryInstances: wrap4 :: (HasBinary (val1, val2, val3, val4) m) => Byte -> (val1 -> val2 -> val3 -> val4 -> wrapper) -> Wrap wrapper m
+ Util.BinaryInstances: wrap4 :: HasBinary (val1, val2, val3, val4) m => Byte -> (val1 -> val2 -> val3 -> val4 -> wrapper) -> Wrap wrapper m
- Util.BinaryInstances: wraps :: (HasWrapper wrapper m) => [Wrap wrapper m]
+ Util.BinaryInstances: wraps :: HasWrapper wrapper m => [Wrap wrapper m]
- Util.BinaryUtils: mapWrite :: (HasBinary b m) => (a -> b) -> (WriteBinary m -> a -> m ())
+ Util.BinaryUtils: mapWrite :: HasBinary b m => (a -> b) -> (WriteBinary m -> a -> m ())
- Util.Broadcaster: broadcast :: (BroadcasterClass broadcaster value) => broadcaster -> value -> IO ()
+ Util.Broadcaster: broadcast :: BroadcasterClass broadcaster value => broadcaster -> value -> IO ()
- Util.Cache: data (Ord key) => Cache key elt
+ Util.Cache: data Ord key => Cache key elt
- Util.Cache: getCached :: (Ord key) => Cache key elt -> key -> IO elt
+ Util.Cache: getCached :: Ord key => Cache key elt -> key -> IO elt
- Util.Cache: newCache :: (Ord key) => (key -> IO elt) -> IO (Cache key elt)
+ Util.Cache: newCache :: Ord key => (key -> IO elt) -> IO (Cache key elt)
- Util.Computation: ($$) :: (HasConfig option configuration) => option -> configuration -> configuration
+ Util.Computation: ($$) :: HasConfig option configuration => option -> configuration -> configuration
- Util.Computation: configUsed :: (HasConfig option configuration) => option -> configuration -> Bool
+ Util.Computation: configUsed :: HasConfig option configuration => option -> configuration -> Bool
- Util.Computation: done :: (Monad m) => m ()
+ Util.Computation: done :: Monad m => m ()
- Util.Computation: exceptionToError :: (Exception -> Maybe String) -> IO a -> IO (WithError a)
+ Util.Computation: exceptionToError :: Exception e => (e -> Maybe String) -> IO a -> IO (WithError a)
- Util.Computation: foreach :: (Monad m) => [a] -> (a -> m b) -> m ()
+ Util.Computation: foreach :: Monad m => [a] -> (a -> m b) -> m ()
- Util.Computation: forever :: (Monad m) => m a -> m b
+ Util.Computation: forever :: Monad m => m a -> m b
- Util.Computation: foreverUntil :: (Monad m) => m Bool -> m ()
+ Util.Computation: foreverUntil :: Monad m => m Bool -> m ()
- Util.Computation: monadifyWithError :: (Monad m) => WithError a -> MonadWithError m a
+ Util.Computation: monadifyWithError :: Monad m => WithError a -> MonadWithError m a
- Util.Computation: toMonadWithError :: (Monad m) => m a -> MonadWithError m a
+ Util.Computation: toMonadWithError :: Monad m => m a -> MonadWithError m a
- Util.Computation: try :: IO a -> IO (Either Exception a)
+ Util.Computation: try :: Exception e => IO a -> IO (Either e a)
- Util.Computation: type Answer a = Either Exception a
+ Util.Computation: type Answer a = Either SomeException a
- Util.Computation: unless :: (Monad m) => Bool -> m () -> m ()
+ Util.Computation: unless :: Monad m => Bool -> m () -> m ()
- Util.Computation: when :: (Monad m) => Bool -> m () -> m ()
+ Util.Computation: when :: Monad m => Bool -> m () -> m ()
- Util.Computation: while :: (Monad m) => m a -> (a -> Bool) -> m a
+ Util.Computation: while :: Monad m => m a -> (a -> Bool) -> m a
- Util.Debug: alwaysDebug :: (Show a) => a -> IO ()
+ Util.Debug: alwaysDebug :: Show a => a -> IO ()
- Util.Debug: debug :: (Show a) => a -> IO ()
+ Util.Debug: debug :: Show a => a -> IO ()
- Util.DeepSeq: ($!!) :: (DeepSeq a) => (a -> b) -> a -> b
+ Util.DeepSeq: ($!!) :: DeepSeq a => (a -> b) -> a -> b
- Util.DeepSeq: deepSeq :: (DeepSeq a) => a -> b -> b
+ Util.DeepSeq: deepSeq :: DeepSeq a => a -> b -> b
- Util.Delayer: addDelayer :: (HasAddDelayer eventSource) => Delayer -> eventSource -> eventSource
+ Util.Delayer: addDelayer :: HasAddDelayer eventSource => Delayer -> eventSource -> eventSource
- Util.Delayer: addDelayerIO :: (HasAddDelayerIO eventSource) => Delayer -> eventSource -> IO eventSource
+ Util.Delayer: addDelayerIO :: HasAddDelayerIO eventSource => Delayer -> eventSource -> IO eventSource
- Util.Delayer: delay :: (HasDelayer object) => object -> IO a -> IO a
+ Util.Delayer: delay :: HasDelayer object => object -> IO a -> IO a
- Util.Delayer: toDelayer :: (HasDelayer object) => object -> Delayer
+ Util.Delayer: toDelayer :: HasDelayer object => object -> Delayer
- Util.Dynamics: coerce :: (Typeable a) => Dyn -> a
+ Util.Dynamics: coerce :: Typeable a => Dyn -> a
- Util.Dynamics: coerceIO :: (Typeable a) => Dyn -> IO a
+ Util.Dynamics: coerceIO :: Typeable a => Dyn -> IO a
- Util.Dynamics: fromDynamic :: (Typeable a) => Dyn -> Maybe a
+ Util.Dynamics: fromDynamic :: Typeable a => Dyn -> Maybe a
- Util.Dynamics: fromDynamicWE :: (Typeable a) => Dyn -> WithError a
+ Util.Dynamics: fromDynamicWE :: Typeable a => Dyn -> WithError a
- Util.Dynamics: toDyn :: (Typeable a) => a -> Dyn
+ Util.Dynamics: toDyn :: Typeable a => a -> Dyn
- Util.Dynamics: typeOf :: (Typeable a) => a -> TypeRep
+ Util.Dynamics: typeOf :: Typeable a => a -> TypeRep
- Util.ExtendedPrelude: addGeneralFallOut :: (Typeable a) => IO (GeneralBreakFn a, GeneralCatchFn a)
+ Util.ExtendedPrelude: addGeneralFallOut :: Typeable a => IO (GeneralBreakFn a, GeneralCatchFn a)
- Util.ExtendedPrelude: allEq :: (Eq a) => [a] -> Bool
+ Util.ExtendedPrelude: allEq :: Eq a => [a] -> Bool
- Util.ExtendedPrelude: class (EqIO v) => OrdIO v
+ Util.ExtendedPrelude: class EqIO v => OrdIO v
- Util.ExtendedPrelude: coMapIO :: (HasCoMapIO option) => (a -> IO b) -> option b -> option a
+ Util.ExtendedPrelude: coMapIO :: HasCoMapIO option => (a -> IO b) -> option b -> option a
- Util.ExtendedPrelude: compareIO :: (OrdIO v) => v -> v -> IO Ordering
+ Util.ExtendedPrelude: compareIO :: OrdIO v => v -> v -> IO Ordering
- Util.ExtendedPrelude: eqIO :: (EqIO v) => v -> v -> IO Bool
+ Util.ExtendedPrelude: eqIO :: EqIO v => v -> v -> IO Bool
- Util.ExtendedPrelude: findDuplicate :: (Ord a) => (b -> a) -> [b] -> Maybe b
+ Util.ExtendedPrelude: findDuplicate :: Ord a => (b -> a) -> [b] -> Maybe b
- Util.ExtendedPrelude: generalisedMerge :: (Monad m) => [a] -> [b] -> (a -> b -> Ordering) -> (Maybe a -> Maybe b -> m (Maybe a, Maybe c)) -> m ([a], [c])
+ Util.ExtendedPrelude: generalisedMerge :: Monad m => [a] -> [b] -> (a -> b -> Ordering) -> (Maybe a -> Maybe b -> m (Maybe a, Maybe c)) -> m ([a], [c])
- Util.ExtendedPrelude: insertOrdGt :: (Ord a) => a -> [a] -> [a]
+ Util.ExtendedPrelude: insertOrdGt :: Ord a => a -> [a] -> [a]
- Util.ExtendedPrelude: insertOrdLt :: (Ord a) => a -> [a] -> [a]
+ Util.ExtendedPrelude: insertOrdLt :: Ord a => a -> [a] -> [a]
- Util.ExtendedPrelude: isOurFallOut :: ObjectID -> Exception -> Maybe String
+ Util.ExtendedPrelude: isOurFallOut :: ObjectID -> Dyn -> Maybe String
- Util.ExtendedPrelude: isPrefix :: (Eq a) => [a] -> [a] -> Maybe [a]
+ Util.ExtendedPrelude: isPrefix :: Eq a => [a] -> [a] -> Maybe [a]
- Util.ExtendedPrelude: mapEq :: (Eq a) => (b -> a) -> (b -> b -> Bool)
+ Util.ExtendedPrelude: mapEq :: Eq a => (b -> a) -> (b -> b -> Bool)
- Util.ExtendedPrelude: mapIO :: (HasMapIO option) => (a -> IO b) -> option a -> option b
+ Util.ExtendedPrelude: mapIO :: HasMapIO option => (a -> IO b) -> option a -> option b
- Util.ExtendedPrelude: mapOrd :: (Ord a) => (b -> a) -> (b -> b -> Ordering)
+ Util.ExtendedPrelude: mapOrd :: Ord a => (b -> a) -> (b -> b -> Ordering)
- Util.ExtendedPrelude: mapPartialM :: (Monad m) => (a -> m (Maybe b)) -> [a] -> m [b]
+ Util.ExtendedPrelude: mapPartialM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
- Util.ExtendedPrelude: monadDot :: (Monad m) => (b -> m c) -> (a -> m b) -> (a -> m c)
+ Util.ExtendedPrelude: monadDot :: Monad m => (b -> m c) -> (a -> m b) -> (a -> m c)
- Util.ExtendedPrelude: ourExcepToMess :: Exception -> Maybe String
+ Util.ExtendedPrelude: ourExcepToMess :: Dyn -> Maybe String
- Util.ExtendedPrelude: readCheck :: (Read a) => String -> Maybe a
+ Util.ExtendedPrelude: readCheck :: Read a => String -> Maybe a
- Util.ExtendedPrelude: showException2 :: Exception -> String
+ Util.ExtendedPrelude: showException2 :: Dyn -> String
- Util.ExtendedPrelude: treeFoldM :: (Monad m) => (ancestorInfo -> state -> node -> m (ancestorInfo, state, [node])) -> ancestorInfo -> state -> node -> m state
+ Util.ExtendedPrelude: treeFoldM :: Monad m => (ancestorInfo -> state -> node -> m (ancestorInfo, state, [node])) -> ancestorInfo -> state -> node -> m state
- Util.ExtendedPrelude: uniqOrd :: (Ord a) => [a] -> [a]
+ Util.ExtendedPrelude: uniqOrd :: Ord a => [a] -> [a]
- Util.ExtendedPrelude: uniqOrdByKey :: (Ord b) => (a -> b) -> [a] -> [a]
+ Util.ExtendedPrelude: uniqOrdByKey :: Ord b => (a -> b) -> [a] -> [a]
- Util.ExtendedPrelude: uniqOrdByKeyOrder :: (Ord b) => (a -> b) -> [a] -> [a]
+ Util.ExtendedPrelude: uniqOrdByKeyOrder :: Ord b => (a -> b) -> [a] -> [a]
- Util.ExtendedPrelude: uniqOrdOrder :: (Ord a) => [a] -> [a]
+ Util.ExtendedPrelude: uniqOrdOrder :: Ord a => [a] -> [a]
- Util.Huffman: huffmanFold :: (Ord a) => (a -> a -> a) -> [a] -> a
+ Util.Huffman: huffmanFold :: Ord a => (a -> a -> a) -> [a] -> a
- Util.ICStringLen: readICStringLen :: (HasBinary a StateBinArea) => ICStringLen -> IO a
+ Util.ICStringLen: readICStringLen :: HasBinary a StateBinArea => ICStringLen -> IO a
- Util.ICStringLen: toUTF8 :: (Enum byte) => String -> [byte]
+ Util.ICStringLen: toUTF8 :: Enum byte => String -> [byte]
- Util.ICStringLen: writeToICStringLen :: (HasBinary a StateBinArea) => a -> IO ICStringLen
+ Util.ICStringLen: writeToICStringLen :: HasBinary a StateBinArea => a -> IO ICStringLen
- Util.IOExtras: catchErrorCalls :: IO a -> IO (Either String a)
+ Util.IOExtras: catchErrorCalls :: IO a -> IO (Either ErrorCall a)
- Util.IOExtras: hGetLineR :: (Read a) => Handle -> IO a
+ Util.IOExtras: hGetLineR :: Read a => Handle -> IO a
- Util.KeyedChanges: deleteKeyedChange :: (Ord key) => key -> delta -> KeyedChanges key delta -> IO ()
+ Util.KeyedChanges: deleteKeyedChange :: Ord key => key -> delta -> KeyedChanges key delta -> IO ()
- Util.KeyedChanges: newKeyedChanges :: (Ord key) => IO (KeyedChanges key delta)
+ Util.KeyedChanges: newKeyedChanges :: Ord key => IO (KeyedChanges key delta)
- Util.KeyedChanges: sendKeyedChanges :: (Ord key) => key -> delta -> KeyedChanges key delta -> IO ()
+ Util.KeyedChanges: sendKeyedChanges :: Ord key => key -> delta -> KeyedChanges key delta -> IO ()
- Util.Myers: diff :: (Eq a) => [a] -> [a] -> [DiffElement a]
+ Util.Myers: diff :: Eq a => [a] -> [a] -> [DiffElement a]
- Util.Myers: diff2 :: (Eq v) => [v] -> [v] -> [DiffElement v]
+ Util.Myers: diff2 :: Eq v => [v] -> [v] -> [DiffElement v]
- Util.Object: objectID :: (Object o) => o -> ObjectID
+ Util.Object: objectID :: Object o => o -> ObjectID
- Util.QuickReadShow: qRead :: (QuickRead toRead) => Int -> String -> [(toRead, String)]
+ Util.QuickReadShow: qRead :: QuickRead toRead => Int -> String -> [(toRead, String)]
- Util.QuickReadShow: qShow :: (QuickShow toShow) => Int -> toShow -> String -> String
+ Util.QuickReadShow: qShow :: QuickShow toShow => Int -> toShow -> String -> String
- Util.QuickReadShow: quickRead :: (QuickRead toRead) => WrapRead toRead
+ Util.QuickReadShow: quickRead :: QuickRead toRead => WrapRead toRead
- Util.QuickReadShow: quickShow :: (QuickShow toShow) => WrapShow toShow
+ Util.QuickReadShow: quickShow :: QuickShow toShow => WrapShow toShow
- Util.Registry: changeKey :: (Ord from) => Registry from to -> from -> from -> IO ()
+ Util.Registry: changeKey :: Ord from => Registry from to -> from -> from -> IO ()
- Util.Registry: data (Ord from) => Registry from to
+ Util.Registry: data Ord from => Registry from to
- Util.Registry: deleteFromRegistry :: (KeyOpsRegistry registry from) => registry -> from -> IO ()
+ Util.Registry: deleteFromRegistry :: KeyOpsRegistry registry from => registry -> from -> IO ()
- Util.Registry: deleteFromRegistryBool :: (KeyOpsRegistry registry from) => registry -> from -> IO Bool
+ Util.Registry: deleteFromRegistryBool :: KeyOpsRegistry registry from => registry -> from -> IO Bool
- Util.Registry: emptyRegistry :: (NewRegistry registry) => registry -> IO ()
+ Util.Registry: emptyRegistry :: NewRegistry registry => registry -> IO ()
- Util.Registry: getRegistryValue :: (Ord from) => Registry from to -> from -> IO to
+ Util.Registry: getRegistryValue :: Ord from => Registry from to -> from -> IO to
- Util.Registry: getRegistryValueSafe :: (Ord from) => String -> Registry from to -> from -> IO to
+ Util.Registry: getRegistryValueSafe :: Ord from => String -> Registry from to -> from -> IO to
- Util.Registry: getValue :: (GetSetRegistry registry from to) => registry -> from -> IO to
+ Util.Registry: getValue :: GetSetRegistry registry from to => registry -> from -> IO to
- Util.Registry: getValue' :: (GetSetRegistry registry from to) => String -> registry -> from -> IO to
+ Util.Registry: getValue' :: GetSetRegistry registry from to => String -> registry -> from -> IO to
- Util.Registry: getValueAsDyn :: (GetSetRegistryDyn registry from) => registry -> from -> IO Dyn
+ Util.Registry: getValueAsDyn :: GetSetRegistryDyn registry from => registry -> from -> IO Dyn
- Util.Registry: getValueDefault :: (GetSetRegistry registry from to) => to -> registry -> from -> IO to
+ Util.Registry: getValueDefault :: GetSetRegistry registry from to => to -> registry -> from -> IO to
- Util.Registry: getValueOpt :: (GetSetRegistry registry from to) => registry -> from -> IO (Maybe to)
+ Util.Registry: getValueOpt :: GetSetRegistry registry from to => registry -> from -> IO (Maybe to)
- Util.Registry: getValueSafe :: (GetSetRegistry registry from to) => String -> registry -> from -> IO to
+ Util.Registry: getValueSafe :: GetSetRegistry registry from to => String -> registry -> from -> IO to
- Util.Registry: listKeys :: (KeyOpsRegistry registry from) => registry -> IO [from]
+ Util.Registry: listKeys :: KeyOpsRegistry registry from => registry -> IO [from]
- Util.Registry: listRegistryContents :: (ListRegistryContents registry from to) => registry from to -> IO [(from, to)]
+ Util.Registry: listRegistryContents :: ListRegistryContents registry from to => registry from to -> IO [(from, to)]
- Util.Registry: listRegistryContentsAndEmptyRegistry :: (ListRegistryContents registry from to) => registry from to -> IO [(from, to)]
+ Util.Registry: listRegistryContentsAndEmptyRegistry :: ListRegistryContents registry from to => registry from to -> IO [(from, to)]
- Util.Registry: listToNewRegistry :: (ListRegistryContents registry from to) => [(from, to)] -> IO (registry from to)
+ Util.Registry: listToNewRegistry :: ListRegistryContents registry from to => [(from, to)] -> IO (registry from to)
- Util.Registry: newRegistry :: (NewRegistry registry) => IO registry
+ Util.Registry: newRegistry :: NewRegistry registry => IO registry
- Util.Registry: setValue :: (GetSetRegistry registry from to) => registry -> from -> to -> IO ()
+ Util.Registry: setValue :: GetSetRegistry registry from to => registry -> from -> to -> IO ()
- Util.Registry: setValueAsDyn :: (GetSetRegistryDyn registry from) => registry -> from -> Dyn -> IO ()
+ Util.Registry: setValueAsDyn :: GetSetRegistryDyn registry from => registry -> from -> Dyn -> IO ()
- Util.Registry: transformValue :: (GetSetRegistry registry from to) => registry -> from -> (Maybe to -> IO (Maybe to, extra)) -> IO extra
+ Util.Registry: transformValue :: GetSetRegistry registry from to => registry -> from -> (Maybe to -> IO (Maybe to, extra)) -> IO extra
- Util.Sink: addNewAction :: (CanAddSinks sinkSource x delta) => sinkSource -> (delta -> IO Bool) -> IO x
+ Util.Sink: addNewAction :: CanAddSinks sinkSource x delta => sinkSource -> (delta -> IO Bool) -> IO x
- Util.Sink: addNewQuickSink :: (CanAddSinks sinkSource x delta) => sinkSource -> (delta -> IO ()) -> IO (x, Sink delta)
+ Util.Sink: addNewQuickSink :: CanAddSinks sinkSource x delta => sinkSource -> (delta -> IO ()) -> IO (x, Sink delta)
- Util.Sink: addNewQuickSinkGeneral :: (CanAddSinks sinkSource x delta) => sinkSource -> (delta -> IO ()) -> SinkID -> IO (x, Sink delta)
+ Util.Sink: addNewQuickSinkGeneral :: CanAddSinks sinkSource x delta => sinkSource -> (delta -> IO ()) -> SinkID -> IO (x, Sink delta)
- Util.Sink: addNewSink :: (CanAddSinks sinkSource x delta) => sinkSource -> (delta -> IO ()) -> IO (x, Sink delta)
+ Util.Sink: addNewSink :: CanAddSinks sinkSource x delta => sinkSource -> (delta -> IO ()) -> IO (x, Sink delta)
- Util.Sink: addNewSinkGeneral :: (CanAddSinks sinkSource x delta) => sinkSource -> (delta -> IO ()) -> SinkID -> IO (x, Sink delta)
+ Util.Sink: addNewSinkGeneral :: CanAddSinks sinkSource x delta => sinkSource -> (delta -> IO ()) -> SinkID -> IO (x, Sink delta)
- Util.Sink: addNewSinkVeryGeneral :: (CanAddSinks sinkSource x delta) => sinkSource -> (delta -> IO ()) -> SinkID -> ParallelExec -> IO (x, Sink delta)
+ Util.Sink: addNewSinkVeryGeneral :: CanAddSinks sinkSource x delta => sinkSource -> (delta -> IO ()) -> SinkID -> ParallelExec -> IO (x, Sink delta)
- Util.Sink: addNewSinkWithInitial :: (CanAddSinks sinkSource x delta) => sinkSource -> (x -> IO ()) -> (delta -> IO ()) -> SinkID -> ParallelExec -> IO (x, Sink delta)
+ Util.Sink: addNewSinkWithInitial :: CanAddSinks sinkSource x delta => sinkSource -> (x -> IO ()) -> (delta -> IO ()) -> SinkID -> ParallelExec -> IO (x, Sink delta)
- Util.Sink: addOldSink :: (CanAddSinks sinkSource x delta) => sinkSource -> Sink delta -> IO x
+ Util.Sink: addOldSink :: CanAddSinks sinkSource x delta => sinkSource -> Sink delta -> IO x
- Util.Sink: invalidate :: (HasInvalidate source) => source -> IO ()
+ Util.Sink: invalidate :: HasInvalidate source => source -> IO ()
- Util.Sources: readContents :: (HasSource source x d) => source -> IO x
+ Util.Sources: readContents :: HasSource source x d => source -> IO x
- Util.Sources: toSimpleSource :: (HasSimpleSource hasSource x) => hasSource -> SimpleSource x
+ Util.Sources: toSimpleSource :: HasSimpleSource hasSource x => hasSource -> SimpleSource x
- Util.Sources: toSource :: (HasSource hasSource x d) => hasSource -> Source x d
+ Util.Sources: toSource :: HasSource hasSource x d => hasSource -> Source x d
- Util.Sources: uniqSimpleSource :: (Eq x) => SimpleSource x -> SimpleSource x
+ Util.Sources: uniqSimpleSource :: Eq x => SimpleSource x -> SimpleSource x
- Util.UTF8: toUTF8 :: (Enum byte) => String -> [byte]
+ Util.UTF8: toUTF8 :: Enum byte => String -> [byte]
- Util.VariableList: newVariableListFromList :: (Ord a) => SimpleSource [a] -> VariableList a
+ Util.VariableList: newVariableListFromList :: Ord a => SimpleSource [a] -> VariableList a
- Util.VariableList: newVariableListFromSet :: (Ord a) => VariableSetSource a -> VariableList a
+ Util.VariableList: newVariableListFromSet :: Ord a => VariableSetSource a -> VariableList a
- Util.VariableMap: addToVariableMap :: (Ord key) => VariableMap key elt -> key -> elt -> IO Bool
+ Util.VariableMap: addToVariableMap :: Ord key => VariableMap key elt -> key -> elt -> IO Bool
- Util.VariableMap: delFromVariableMap :: (Ord key) => VariableMap key elt -> key -> IO Bool
+ Util.VariableMap: delFromVariableMap :: Ord key => VariableMap key elt -> key -> IO Bool
- Util.VariableMap: getVariableMapByKey :: (Ord key) => VariableMap key elt -> key -> SimpleSource (Maybe elt)
+ Util.VariableMap: getVariableMapByKey :: Ord key => VariableMap key elt -> key -> SimpleSource (Maybe elt)
- Util.VariableMap: lookupMap :: (Ord key) => VariableMapData key elt -> key -> Maybe elt
+ Util.VariableMap: lookupMap :: Ord key => VariableMapData key elt -> key -> Maybe elt
- Util.VariableMap: lookupVariableMap :: (Ord key) => VariableMap key elt -> key -> IO (Maybe elt)
+ Util.VariableMap: lookupVariableMap :: Ord key => VariableMap key elt -> key -> IO (Maybe elt)
- Util.VariableMap: lookupWithDefaultMap :: (Ord key) => VariableMapData key elt -> elt -> key -> elt
+ Util.VariableMap: lookupWithDefaultMap :: Ord key => VariableMapData key elt -> elt -> key -> elt
- Util.VariableMap: mapToFM :: (Ord key) => VariableMapData key elt -> Map key elt
+ Util.VariableMap: mapToFM :: Ord key => VariableMapData key elt -> Map key elt
- Util.VariableMap: mapToList :: (Ord key) => VariableMapData key elt -> [(key, elt)]
+ Util.VariableMap: mapToList :: Ord key => VariableMapData key elt -> [(key, elt)]
- Util.VariableMap: mapToVariableSetSource :: (Ord key) => (key -> elt -> element) -> VariableMap key elt -> VariableSetSource element
+ Util.VariableMap: mapToVariableSetSource :: Ord key => (key -> elt -> element) -> VariableMap key elt -> VariableSetSource element
- Util.VariableMap: newEmptyVariableMap :: (Ord key) => IO (VariableMap key elt)
+ Util.VariableMap: newEmptyVariableMap :: Ord key => IO (VariableMap key elt)
- Util.VariableMap: newVariableMap :: (Ord key) => [(key, elt)] -> IO (VariableMap key elt)
+ Util.VariableMap: newVariableMap :: Ord key => [(key, elt)] -> IO (VariableMap key elt)
- Util.VariableMap: newVariableMapFromFM :: (Ord key) => Map key elt -> IO (VariableMap key elt)
+ Util.VariableMap: newVariableMapFromFM :: Ord key => Map key elt -> IO (VariableMap key elt)
- Util.VariableMap: updateMap :: (Ord key) => VariableMap key elt -> VariableMapUpdate key elt -> IO Bool
+ Util.VariableMap: updateMap :: Ord key => VariableMap key elt -> VariableMapUpdate key elt -> IO Bool
- Util.VariableMap: variableMapToList :: (Ord key) => VariableMap key elt -> IO [(key, elt)]
+ Util.VariableMap: variableMapToList :: Ord key => VariableMap key elt -> IO [(key, elt)]
- Util.VariableSet: class (Ord key) => HasKey x key | x -> key
+ Util.VariableSet: class Ord key => HasKey x key | x -> key
- Util.VariableSet: listToSetSource :: (Ord x) => SimpleSource [x] -> VariableSetSource x
+ Util.VariableSet: listToSetSource :: Ord x => SimpleSource [x] -> VariableSetSource x
- Util.VariableSet: newEmptyVariableSet :: (HasKey x key) => IO (VariableSet x)
+ Util.VariableSet: newEmptyVariableSet :: HasKey x key => IO (VariableSet x)
- Util.VariableSet: newVariableSet :: (HasKey x key) => [x] -> IO (VariableSet x)
+ Util.VariableSet: newVariableSet :: HasKey x key => [x] -> IO (VariableSet x)
- Util.VariableSet: setVariableSet :: (HasKey x key) => VariableSet x -> [x] -> IO ()
+ Util.VariableSet: setVariableSet :: HasKey x key => VariableSet x -> [x] -> IO ()
- Util.VariableSet: toKey :: (HasKey x key) => x -> key
+ Util.VariableSet: toKey :: HasKey x key => x -> key
- Util.VariableSet: updateSet :: (HasKey x key) => VariableSet x -> VariableSetUpdate x -> IO ()
+ Util.VariableSet: updateSet :: HasKey x key => VariableSet x -> VariableSetUpdate x -> IO ()
- Util.VariableSetBlocker: blockVariableSet :: (HasKey a key) => Blocker a -> BlockID -> IO (VariableSetSource a)
+ Util.VariableSetBlocker: blockVariableSet :: HasKey a key => Blocker a -> BlockID -> IO (VariableSetSource a)
- Util.VariableSetBlocker: closeBlocker :: (HasKey a key) => Blocker a -> BlockID -> IO ()
+ Util.VariableSetBlocker: closeBlocker :: HasKey a key => Blocker a -> BlockID -> IO ()
- Util.VariableSetBlocker: newBlocker :: (HasKey a key) => VariableSetSource a -> IO (Blocker a)
+ Util.VariableSetBlocker: newBlocker :: HasKey a key => VariableSetSource a -> IO (Blocker a)
- Util.VariableSetBlocker: newBlockerWithPreAction :: (HasKey a key) => VariableSetSource a -> ([a] -> IO ()) -> IO (Blocker a)
+ Util.VariableSetBlocker: newBlockerWithPreAction :: HasKey a key => VariableSetSource a -> ([a] -> IO ()) -> IO (Blocker a)
- Util.VariableSetBlocker: openBlocker :: (HasKey a key) => Blocker a -> BlockID -> IO ()
+ Util.VariableSetBlocker: openBlocker :: HasKey a key => Blocker a -> BlockID -> IO ()
- Util.VisitedSet: isVisited :: (Ord key) => VisitedSet key -> key -> IO Bool
+ Util.VisitedSet: isVisited :: Ord key => VisitedSet key -> key -> IO Bool
- Util.VisitedSet: newVisitedSet :: (Ord key) => IO (VisitedSet key)
+ Util.VisitedSet: newVisitedSet :: Ord key => IO (VisitedSet key)
Files
- Util/AtomString.hs +2/−4
- Util/Bytes.hs +2/−5
- Util/Computation.hs +4/−3
- Util/Debug.hs +3/−3
- Util/ExtendedPrelude.hs +8/−17
- Util/IOExtras.hs +4/−10
- Util/Registry.hs +1/−1
- Util/Thread.hs +20/−10
- uni-util.cabal +4/−7
Util/AtomString.hs view
@@ -114,9 +114,7 @@ fromStringWEHacked str = do either <- tryJust- (\ exception -> case dynExceptions exception of- Nothing -> Nothing -- don't handle this as it's not even a dyn.- Just dyn ->+ (\ dyn -> case fromDynamic dyn of Nothing -> Nothing -- not a fromStringError. Just (FromStringExcep mess) -> Just mess@@ -130,7 +128,7 @@ return (toWithError either) fromStringError :: String -> a-fromStringError mess = throwDyn (FromStringExcep mess)+fromStringError mess = throw $ toDyn (FromStringExcep mess) newtype FromStringExcep = FromStringExcep String deriving (Typeable)
Util/Bytes.hs view
@@ -80,9 +80,7 @@ import System.IO import System.IO.Error-import Control.Exception(Exception(IOException),throw)--+import Control.Exception (throw) -- ---------------------------------------------------------------------- -- The datatypes@@ -175,11 +173,10 @@ throwEOF handle = do let- eofError = IOException (+ eofError = mkIOError eofErrorType "BinaryIO" (Just handle) Nothing- ) throw eofError -- ----------------------------------------------------------------------
Util/Computation.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE ScopedTypeVariables #-} -- | -- Description : Miscellaneous Monads, in particular 'Computation.WithError'.@@ -117,7 +118,7 @@ -- Type Definitions -- -------------------------------------------------------------------------- -type Answer a = Either Exception a+type Answer a = Either SomeException a -- -------------------------------------------------------------------------- -- Done@@ -150,7 +151,7 @@ propagate (Right v) = return v catchall :: IO a -> IO a -> IO a-catchall c1 c2 = Control.Exception.catch c1 (\ _ -> c2)+catchall c1 c2 = Control.Exception.catch c1 (\ (_ :: SomeException) -> c2) tryUntilOK :: IO a -> IO a tryUntilOK c = catchall c (tryUntilOK c)@@ -285,7 +286,7 @@ v <- act return (Value v) -exceptionToError :: (Exception -> Maybe String) -> IO a -> IO (WithError a)+exceptionToError :: Exception e => (e -> Maybe String) -> IO a -> IO (WithError a) exceptionToError testFn action = catchJust testFn
Util/Debug.hs view
@@ -125,7 +125,7 @@ Left error -> do alwaysDebug ("AlwaysDebug.debug caught "++mess)- throw error+ throw (error :: SomeException) Right success -> return success (@@:) :: String -> IO a -> IO a@@ -140,7 +140,7 @@ wrapErrorIO :: String -> a -> IO a wrapErrorIO str value =- Control.Exception.catchJust errorCalls (value `seq` return value)- (\ mess -> error (str++":"++mess))+ Control.Exception.catch (value `seq` return value)+ (\ mess -> error (str ++ ":"++ show (mess :: ErrorCall)))
Util/ExtendedPrelude.hs view
@@ -511,7 +511,7 @@ } deriving (Typeable) mkBreakFn :: ObjectID -> BreakFn-mkBreakFn id mess = throwDyn (FallOutExcep {fallOutId = id,mess = mess})+mkBreakFn id mess = throw $ toDyn (FallOutExcep {fallOutId = id,mess = mess}) newFallOut :: IO (ObjectID,IO a -> IO (Either String a))@@ -523,12 +523,8 @@ return (id,tryFn) -isOurFallOut :: ObjectID -> Exception -> Maybe String-isOurFallOut oId exception =- case dynExceptions exception of- Nothing -> Nothing- -- don't handle this as it's not even a dyn.- Just dyn ->+isOurFallOut :: ObjectID -> Dyn -> Maybe String+isOurFallOut oId dyn = case fromDynamic dyn of Nothing -> Nothing -- not a fallout. Just fallOutExcep -> if fallOutId fallOutExcep /= oId@@ -552,7 +548,7 @@ do (objectId,catchFn) <- newGeneralFallOut let- breakFn a = throwDyn (GeneralFallOutExcep {+ breakFn a = throw $ toDyn (GeneralFallOutExcep { generalFallOutId = objectId,a=a}) return (GeneralBreakFn breakFn,catchFn) @@ -569,10 +565,7 @@ let tryFn act = tryJust- (\ exception -> case dynExceptions exception of- Nothing -> Nothing- -- don't handle this as it's not even a dyn.- Just dyn ->+ (\ dyn -> case fromDynamic dyn of Nothing -> Nothing -- not a fallout, or not the right type of a.@@ -593,16 +586,14 @@ -- General catch function for our exceptions. -- ------------------------------------------------------------------------ -ourExcepToMess :: Exception -> Maybe String-ourExcepToMess excep = case dynExceptions excep of- Nothing -> Nothing- Just dyn ->+ourExcepToMess :: Dyn -> Maybe String+ourExcepToMess dyn = case fromDynamic dyn of Just fallOut -> Just ("Fall-out exception " ++ show (fallOutId fallOut) ++ ": " ++ mess fallOut) Nothing -> Just ("Mysterious dynamic exception " ++ show dyn) -showException2 :: Exception -> String+showException2 :: Dyn -> String showException2 exception = fromMaybe (show exception) (ourExcepToMess exception)
Util/IOExtras.hs view
@@ -22,9 +22,6 @@ simpleModifyIORef, -- :: IORef a -> (a -> (a,b)) -> IO b -- carry out a pure modification of an IORef.- -- From ghc5.05 onwards, we should be able to use atomicModifyIORef- -- for this.- ) where import System.IO.Error@@ -46,11 +43,8 @@ catchGeneral discriminator action = do result <- tryJust- (\ excep ->- case ioErrors excep of- Nothing -> Nothing- Just ioError ->- if discriminator ioError+ (\ ioErr ->+ if discriminator ioErr then Just () else@@ -61,8 +55,8 @@ Left () -> return Nothing Right success -> return (Just success) -catchErrorCalls :: IO a -> IO (Either String a)-catchErrorCalls action = tryJust errorCalls action+catchErrorCalls :: IO a -> IO (Either ErrorCall a)+catchErrorCalls = Control.Exception.try hGetLineR :: Read a => Handle -> IO a hGetLineR handle =
Util/Registry.hs view
@@ -460,7 +460,7 @@ Left error -> do putVal lockedRegistry from valInOpt- Control.Exception.throw error+ Control.Exception.throw (error :: SomeException) Right (valOutOpt,extra) -> do putVal lockedRegistry from valOutOpt
Util/Thread.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -20,7 +21,7 @@ -- ALMOST identical with standard action. -- The differences are (a) that it takes an extra string argument -- (which goes first); (b) if the thread fails because of- -- "BlockedOnDeadMVar" nothing is printed, but we output a+ -- "BlockedOnMVar" nothing is printed, but we output a -- message to "debug" which includes the label. -- NB. This function no longer seems to be necessary in recent -- versions of GHC (current is 6.02.1) so please don't use it.@@ -29,7 +30,7 @@ -- This wraps an action so that if killed nothing is printed and it -- just returns. This is useful for Expect and other things which -- get rid of a redundant thread by killing it.- -- Now changed so that it also prints nothing for BlockedOnDeadMVar+ -- Now changed so that it also prints nothing for BlockedOnMVar -- delay thread execution@@ -105,10 +106,15 @@ do result <- tryJust- (\ exception -> case exception of- AsyncException ThreadKilled -> Just ()- BlockedOnDeadMVar -> Just ()- _ -> Nothing+ (\ exception -> case fromException exception of+ Just ThreadKilled -> Just ()+ _ -> case fromException exception of+#if __GLASGOW_HASKELL__ >= 612+ Just BlockedIndefinitelyOnMVar -> Just ()+#else+ Just BlockedOnDeadMVar -> Just ()+#endif+ _ -> Nothing ) action case result of@@ -133,8 +139,12 @@ newAction = do error <- tryJust- (\ exception -> case exception of- BlockedOnDeadMVar -> Just ()+ (\ exception -> case fromException exception of+#if __GLASGOW_HASKELL__ >= 612+ Just BlockedIndefinitelyOnMVar -> Just ()+#else+ Just BlockedOnDeadMVar -> Just ()+#endif _ -> Nothing ) action@@ -174,7 +184,7 @@ mapM takeMVar mVars -- this version is careful to propagate exceptions, at a slight cost.-mapMConcurrentExcep :: (a -> IO b) -> [a] -> IO [b]+mapMConcurrentExcep :: forall a b . (a -> IO b) -> [a] -> IO [b] mapMConcurrentExcep mapFn [] = return [] mapMConcurrentExcep mapFn [a] = do@@ -182,7 +192,7 @@ return [b] mapMConcurrentExcep mapFn as = do- (mVars :: [MVar (Either Exception b)]) <- mapM+ (mVars :: [MVar (Either SomeException b)]) <- mapM (\ a -> do mVar <- newEmptyMVar
uni-util.cabal view
@@ -1,5 +1,5 @@ name: uni-util-version: 2.2.0.0+version: 2.2.1.0 build-type: Simple license: LGPL license-file: LICENSE@@ -14,7 +14,7 @@ They are kept for compatibility reason and put on hackage to ease installation. cabal-version: >= 1.4-Tested-With: GHC==6.8.3, GHC==6.10.4, GHC==6.12.3+Tested-With: GHC==6.10.4, GHC==6.12.3 extra-source-files: include/new_object.h include/default_options.h @@ -45,7 +45,7 @@ include-dirs: include c-sources: new_object.c, default_options.c - build-depends: base >= 3 && < 4, parsec < 3, mtl, directory,+ build-depends: base >= 4 && < 5, parsec < 3, mtl, directory, network, containers, bytestring, array, old-time if flag(base4)@@ -57,7 +57,4 @@ if os(windows) cpp-options: -DWINDOWS - if impl(ghc < 6.10)- extensions: PatternSignatures- else- ghc-options: -fwarn-unused-imports -fno-warn-warnings-deprecations+ ghc-options: -fwarn-unused-imports -fno-warn-warnings-deprecations