Re: Liberalising IncoherentInstances

2013-07-28 Thread AntC
> AntC clear.net.nz> writes: Uh-oh, quoted the wrong example. I mean: Starting with: class C a b | a -> b where foo :: a -> b instance C [a] [a] where foo = id t11 = \x -> foo [x] -- t11 :: t -> [t] I then added: instance C [Char] [Char] where foo = id

Re: Liberalising IncoherentInstances

2013-07-28 Thread AntC
> Simon Peyton-Jones 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, MartinS, Ed

Re: throwTo semantics

2013-07-28 Thread Roman Cheplyaka
* Bertram Felgenhauer [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 > > thread has received the

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 seriou

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

Re: change location of user's package directory

2013-07-28 Thread Brandon Allbery
On Sun, Jul 28, 2013 at 5:35 AM, harry 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 reliably expanded even

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 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: http://haskell.1045720.n5.nabble.com/change-locati

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. B