- r <- try $ Win32.sHGetFolderPath nullPtr Win32.cSIDL_PROFILE nullPtr 0
- case (r :: Either IOException String) of
- Right s -> return s
- Left _ -> do
- r1 <- try $ Win32.sHGetFolderPath nullPtr Win32.cSIDL_WINDOWS nullPtr 0
- case r1 of
- Right s -> return s
- Left e -> ioError (e :: IOException)
+ r <- try $ Win32.sHGetFolderPath nullPtr Win32.cSIDL_PROFILE nullPtr 0
+ case (r :: Either IOException String) of
+ Right s -> return s
+ Left _ -> do
+ r1 <- try $ Win32.sHGetFolderPath nullPtr Win32.cSIDL_WINDOWS nullPtr 0
+ case r1 of
+ Right s -> return s
+ Left e -> ioError (e :: IOException)