Re: change location of user's package directory

2013-07-28 Thread harry
Albert Y. C. Lai wrote On 13-07-25 03:14 PM, harry wrote: How can I change the location that ghc and ghc-pkg use for the user's package directory? I'm running GHC in a very restricted environment where I don't have access to $HOME, but I can use specific subdirectories. Cannot. But you

Re: change location of user's package directory

2013-07-28 Thread harry
harry wrote $ ghc-pkg check --package-db=~/cabal ghc-pkg: ~/cabal: openFile: does not exist (No such file or directory) $ ls ~/cabal package.cache Ah, the ~ seems to have been tripping it up. Thank you. -- View this message in context:

throwTo semantics

2013-07-28 Thread Roman Cheplyaka
The documentation for throwTo says: throwTo does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target thread has received the exception. This is a useful property to know when dealing with race conditions: eg. if there

Re: change location of user's package directory

2013-07-28 Thread Brandon Allbery
On Sun, Jul 28, 2013 at 5:35 AM, harry volderm...@hotmail.com wrote: $ ghc-pkg check --package-db=~/cabal ghc-pkg: ~/cabal: openFile: does not exist (No such file or directory) $ ls ~/cabal package.cache Yet another reason to avoid ~... it's (a) only expanded by the shell, and (b) not

Re: throwTo semantics

2013-07-28 Thread Bertram Felgenhauer
Roman Cheplyaka wrote: The documentation for throwTo says: throwTo does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target thread has received the exception. This is a useful property to know when dealing with

RE: cascading type errors in ghc

2013-07-28 Thread Simon Peyton-Jones
Giving good type error messages is tricky! You get different behaviour for literals because 0 has type (forall a. Num a = a), whereas you declared x1 to have type Int. GHC could have additionally said Can't find an instance for Num Bool, but it suppresses such errors if there are more serious

Re: throwTo semantics

2013-07-28 Thread Roman Cheplyaka
* Bertram Felgenhauer bertram.felgenha...@googlemail.com [2013-07-28 17:57:04+0200] Roman Cheplyaka wrote: The documentation for throwTo says: throwTo does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target

Re: Liberalising IncoherentInstances

2013-07-28 Thread AntC
Simon Peyton-Jones simonpj at microsoft.com writes: I've realised that GHC's -XIncoherentInstances flag is, I think, over-conservative. Hi Simon, by coincidence I've just come across a very similar issue with overlapping instances and FunDeps (following-up some discussion with Oleg,