From d7d33810d562a80e0954bafe045ae2275109999a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 13 Dec 2016 01:47:35 +0300 Subject: bugfix (withPrompt no longer swallows IOError) --- src/Windows/Environment.hs | 4 ++-- src/Windows/Registry.hs | 7 +++---- src/Windows/Utils.hs | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/Windows/Environment.hs b/src/Windows/Environment.hs index 0399d5b..859667e 100644 --- a/src/Windows/Environment.hs +++ b/src/Windows/Environment.hs @@ -22,8 +22,8 @@ module Windows.Environment import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Except (ExceptT(..)) -import Data.List (intercalate) -import Data.List.Split (splitOn) +import Data.List (intercalate) +import Data.List.Split (splitOn) import qualified Windows.Registry as Registry import Windows.Utils (notifyEnvironmentUpdate) diff --git a/src/Windows/Registry.hs b/src/Windows/Registry.hs index 5203fb8..41275bf 100644 --- a/src/Windows/Registry.hs +++ b/src/Windows/Registry.hs @@ -35,21 +35,20 @@ module Windows.Registry , setStringPreserveType ) where +import Control.Exception (bracket) +import Control.Monad.Trans.Except (ExceptT(..), catchE, throwE) import Data.Bits ((.|.)) import qualified Data.ByteString as B import Data.List (intercalate) import Data.Maybe (fromJust) -import Data.Tuple (swap) import qualified Data.Text as T import Data.Text.Encoding (decodeUtf16LE, encodeUtf16LE) -import Control.Exception (bracket) -import Control.Monad.Trans.Except (ExceptT(..), catchE, throwE) +import Data.Tuple (swap) import Foreign.ForeignPtr (withForeignPtr) import Foreign.Marshal.Alloc (alloca, allocaBytes) import Foreign.Marshal.Array (peekArray, pokeArray) import Foreign.Storable (peek, poke) import System.IO.Error (catchIOError, isDoesNotExistError) - import qualified System.Win32.Types as WinAPI import qualified System.Win32.Registry as WinAPI diff --git a/src/Windows/Utils.hs b/src/Windows/Utils.hs index 66f2df5..6dfaa5c 100644 --- a/src/Windows/Utils.hs +++ b/src/Windows/Utils.hs @@ -8,8 +8,7 @@ module Windows.Utils ( notifyEnvironmentUpdate ) where -import Foreign.C.Types (CIntPtr(..)) - +import Foreign.C.Types (CIntPtr(..)) import qualified Graphics.Win32.GDI.Types as WinAPI import qualified Graphics.Win32.Message as WinAPI import qualified System.Win32.Types as WinAPI -- cgit v1.2.3