[Haskell-cafe] Yi on Windows

Jeff Wheeler wheele11 at illinois.edu
Fri Oct 15 17:22:39 EDT 2010


On Thu, Oct 14, 2010 at 1:41 PM, Peter Marks <peter at indigomail.net> wrote:

> If you start Yi with no config file, press any key, press "h", choose a key
> binding, then save the file, you get a file c:\Users\peter\.yi\yi.hs

Oh, indeed. I didn't realize that. The behavior is defined in
Yi.Config.Default.nilKeymap and is very stupid about how it calculates
the config file location. We should be able to get this path from Dyre
instead.

> Hmm, although what I said is correct, it is not causing this problem.
> Windows 7 does use a different directory for local user data, but it
> implements some magic to make references to the old location access the new
> location. If you do a dir of "C:\Users\peter", "Local Settings" doesn't
> exist, but if you dir "C:\Users\peter\Local Settings\Cache\yi", you actually
> get the contents of "C:\Users\peter\AppData\Local\Cache\yi", which does
> contain the file "errors.txt"! It is a sort of invisible simlink.

Woah . . .

> The actual problem I am having is that dyre tries to delete "errors.txt"
> straight after reading it with readFile. As readFile is lazy, the runtime is
> keeping the file open so, on Windows at least, it can't be deleted. I'm not
> really sure why it wants to delete the file though. I guess it is so that
> any warning messages are only shown the first time you launch after a
> compile, then deleted. I don't see why the errors file can't just be left so
> that you see errors whenever you launch. I'll try changing this later this
> evening (UK) and let you know if it works. The alternative would be to force
> the file to be read strictly then closed.

I think it's only important that they be deleted after a successful compile.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign


More information about the Haskell-Cafe mailing list