<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head><body
bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I am using Haskell to write Alfred programs, but I have run into an
issue I just can not fix. The routine for reading a data file in a
application specific location for Alfred never detects the file as
non-existant. It then dies on the read. Here is the code:<br>
<br>
getAlfredCacheFileContents :: String -> IO (String)<br>
getAlfredCacheFileContents fileName = do<br>
h <- getHomeDirectory<br>
fExist <- doesFileExist $ h ++ cacheDirBasic ++ getBundleID ++
"/" ++ fileName<br>
if fExist<br>
then do<br>
contents <- readFile $ h ++ cacheDirBasic ++ getBundleID ++
"/" ++ fileName<br>
return contents<br>
else<br>
return ""<br>
<br>
I just installed the latest version on my Mac Air. It always does the
call to readFile, even when the file doesn't exist.<br>
<div class="moz-signature">-- <br>
<div>Sent with <a href="http://www.getpostbox.com"><span style="color:
rgb(51, 102, 153);">Postbox</span></a></div></div>
</body>
</html>