RE: [Haskell] Fundep broken in GHC 6.6

2007-01-03 Thread Simon Peyton-Jones
[redirecting to ghc users]

Actually this didn't work in 6.4.2 either!  (Though it did in 6.4, for reasons 
I have not investigated.)

Indeed I think your reasoning is correct.  GHC tries to be pretty relaxed about 
reporting ambiguous types, which is what this amounts to really.

I have committed a fix to the HEAD that relaxes the condition, and allows this 
program.  It should appear in 6.6.1 also.

Thanks for the report

Simon

| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
| On Behalf Of dpus
| Sent: 12 November 2006 19:36
| To: haskell@haskell.org
| Subject: [Haskell] Fundep broken in GHC 6.6
|
| Hi,
|
| The following class declaration worked in GHC 6.4.
| I recently upgraded to 6.6 (following Debian), and
| now it is broken.
|
| class Error e = Game b mv e | b - mv e where
| newBoard :: MonadState b m = m ()
| ...
|
| Since MonadState has the fundep m - b, the type
| of newBoard fully specifies all of the class parameters.
| And this worked fine in GHC 6.4. But GHC 6.6
| complains:
|
| The class method `newBoard'
| mentions none of the type variables of the class Game b mv e
| When checking the class method: newBoard :: m ()
| In the class declaration for `Game'
|
| Any ideas?
|
| Thanks,
| Yitz
| ___
| Haskell mailing list
| Haskell@haskell.org
| http://www.haskell.org/mailman/listinfo/haskell
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Compiling 6.6 repos on Mac OS X

2007-01-03 Thread C.M.Brown
Hi,

I have recently tried to compile the 6.6 version of ghc from the darcs
repository.

I followed the intructions to pull ghc from the repository:

darcs get --partial http://darcs.haskell.org/ghc-6.6/ghc
cd ghc
chmod +x darc-add
./darcs-add -extra pull

The build process seems to get past stage 1, but fails at the beginning of
stage 2:

../compiler/ghc-inplace -optc-O -optc-Wall -optc-W
-optc-Wstrict-prototypes -optc-Wmissing-prototypes
-optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return
-optc-Wbad-function-cast -optc-I../includes -optc-I. -optc-Iparallel
-optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-fno-strict-aliasing
-H16m -O -optc-O2 -static -I. -#include HCIncludes.h -fvia-C -dcmm-lint
-c Linker.c -o Linker.o
Linker.c: In function 'loadObj':

Linker.c:1383:0:
 error: 'misalignment' undeclared (first use in this function)

Linker.c:1383:0:
 error: (Each undeclared identifier is reported only once

Linker.c:1383:0:  error: for each function it appears in.)
make[1]: *** [Linker.o] Error 1
make: *** [stage1] Error 1

I am compiling this with ghc-6.6 (the latest version from darcs) and gcc
4.0.

Kind regards,
Chris.


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Haskell] Fundep broken in GHC 6.6

2007-01-03 Thread Yitzchak Gale

On 12 November 2006 I wrote (on the haskell list):

class Error e = Game b mv e | b - mv e where
newBoard :: MonadState b m = m ()
...
Since MonadState has the fundep m - b, the type
of newBoard fully specifies all of the class parameters
But GHC 6.6 complains...


Simon Peyton-Jones wrote:

I have committed a fix to the HEAD that relaxes the
condition, and allows this program.
It should appear in 6.6.1 also.


Thank you!

Am I correct to assume that this fix only applies to the
specific case of unspecified class parameters in
method declarations? And not any of the other cases
where fundeps on class constraints resolve type ambiguity
but are ignored by GHC, such as instance declarations?

Does the fix actually look at the fundeps in the class
constraint on the method, or just relax the
requirement that all class parameters be specified in
every method? If it is the latter, as I suspect, then is
the requirement always relaxed, or only when there is
a class constraint on the method?

Thanks,
Yitz
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users