diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-12-13 01:47:35 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-12-13 01:47:35 +0300 |
commit | d7d33810d562a80e0954bafe045ae2275109999a (patch) | |
tree | b07e041a8d6c840df460b5a6dd3e4fa1d56b29a8 /src | |
parent | use monad transformers (diff) | |
download | windows-env-d7d33810d562a80e0954bafe045ae2275109999a.tar.gz windows-env-d7d33810d562a80e0954bafe045ae2275109999a.zip |
bugfix (withPrompt no longer swallows IOError)
Diffstat (limited to 'src')
-rw-r--r-- | src/Windows/Environment.hs | 4 | ||||
-rw-r--r-- | src/Windows/Registry.hs | 7 | ||||
-rw-r--r-- | src/Windows/Utils.hs | 3 |
3 files changed, 6 insertions, 8 deletions
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 |