HGL 3.2.0.1 → 3.2.0.2
raw patch · 2 files changed
+14/−4 lines, 2 filesdep +Win32
Dependencies added: Win32
Files
- Graphics/HGL/Internals/Utilities.hs +12/−3
- HGL.cabal +2/−1
Graphics/HGL/Internals/Utilities.hs view
@@ -16,11 +16,11 @@ module Graphics.HGL.Internals.Utilities( bracket, bracket_, safeTry,- E.IOException,+ Exception, modMVar, modMVar_ ) where -import qualified Control.Exception as E (bracket, try, IOException)+import qualified Control.Exception as E (bracket, try, IOException, tryJust, ioErrors) import Control.Concurrent( MVar, takeMVar, putMVar ) bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c@@ -30,8 +30,17 @@ bracket_ :: IO a -> (a -> IO b) -> IO c -> IO c bracket_ left right m = bracket left right (const m) -safeTry :: IO a -> IO (Either E.IOException a)+type Exception = E.IOException+safeTry :: IO a -> IO (Either Exception a)++#if __GLASGOW_HASKELL >= 610 +-- ghc-6.10 safeTry = E.try+#else+-- ghc 6.8 (and below?)+safeTry = E.tryJust E.ioErrors+#endif+ ---------------------------------------------------------------- -- Utilities
HGL.cabal view
@@ -1,5 +1,5 @@ name: HGL-version: 3.2.0.1+version: 3.2.0.2 license: BSD3 license-file: LICENSE author: Alastair Reid@@ -50,6 +50,7 @@ Graphics.HGL.Internals.Flag, Graphics.HGL.Internals.Utilities if os(windows)+ build-depends: Win32 cpp-options: -DX_DISPLAY_MISSING other-modules: Graphics.HGL.Win32.Bitmap,