Parallelism in 6.6 and seq vs. pseq

2006-10-27 Thread Simon Marlow
I just noticed, thanks to some testing of the parallelism support in 6.6 by 
Satnam Singh, that Control.Parallel exports seq when in fact it should probably 
export pseq.


The difference is subtle.  The semantics of seq and pseq are identical; however, 
GHC can see that seq is strict in both its arguments and hence could choose to 
evaluate them in either order, whereas pseq is only strict in its first argument 
as far as the strictness analyser is concerned.  The point is that pseq is 
useful for controlling evaluation order, which is what you want for adding 
parallelism to a program.  seq, on the other hand, is not useful for controlling 
evaluation order.  The documentation in 6.6 is also incorrect on this point.


pseq is currently not exported by Control.Parallel, this is an oversight on my 
part, you have to import it from GHC.Conc for now.  For 6.8 we'll export pseq 
from Control.Parallel instead of seq.


Incedentally, the fixity of par is also wrong in 6.6: it should be infixr 0, but 
in fact it has the default fixity of infixl 0.  This means if you write an 
expression like 'x `par` y `seq` z', it isn't doing what you think.  Workaround: 
either use parentheses, or define your own par with the right fixity.


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


GHC 6.6 for OS X using MacPorts

2006-10-27 Thread Gregory Wright


Hi,

GHC 6.6 is now available for OS X systems on both Intel and PowerPC
processors using the MacPorts infrastructure.

The compiler is built from source, using a binary bootstrap compiler.  
OS X
versions 10.3 (Panther) and 10.4 (Tiger) are supported for PowerPC  
processors;

for Intel processors, version 10.4.

MacPorts (formerly Darwinports) is a packaging system for managing
builds of unix-compatible software on OS X.  For more information on  
MacPorts,

see

http://www.macports.org/

A new ghc-devel port will soon be available for those who just have
to live on the bleeding edge.


Best Wishes,
Greg

Gregory Wright
Antiope Associates LLC
[EMAIL PROTECTED]

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


Re: GHC 6.6 for OS X using MacPorts

2006-10-27 Thread C.M.Brown
Hi Greg,

I have just been trying to install ghc 6.6 using Darwin Ports, but the
search facility can't find ghc-6.6. :

sudo port selfupdate
DarwinPorts base version 1.320 installed
Downloaded MacPorts base version 1.320
The MacPorts installation is not outdated and so was not updated
selfupdate done!

dhcp2940:~ cmb21$ port search ghc
ghclang/ghc   6.4.2The Glorious
Glasgow Haskell Compilation System
ghc-devel  lang/ghc-devel 6.5  The Glorious
Glasgow Haskell Compilation System (development version)

dhcp2940:~ cmb21$

Am I doing something wrong?

Kind regards,

Chris Brown,



On Fri, 27 Oct 2006, Gregory Wright wrote:


 Hi,

 GHC 6.6 is now available for OS X systems on both Intel and PowerPC
 processors using the MacPorts infrastructure.

 The compiler is built from source, using a binary bootstrap compiler.
 OS X
 versions 10.3 (Panther) and 10.4 (Tiger) are supported for PowerPC
 processors;
 for Intel processors, version 10.4.

 MacPorts (formerly Darwinports) is a packaging system for managing
 builds of unix-compatible software on OS X.  For more information on
 MacPorts,
 see

   http://www.macports.org/

 A new ghc-devel port will soon be available for those who just have
 to live on the bleeding edge.


 Best Wishes,
 Greg

 Gregory Wright
 Antiope Associates LLC
 [EMAIL PROTECTED]

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

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


Re: GHC 6.6 for OS X using MacPorts

2006-10-27 Thread Gregory Wright


On Oct 27, 2006, at 10:25 AM, C.M.Brown wrote:


Hi Greg,

I have just been trying to install ghc 6.6 using Darwin Ports, but the
search facility can't find ghc-6.6. :

sudo port selfupdate
DarwinPorts base version 1.320 installed
Downloaded MacPorts base version 1.320
The MacPorts installation is not outdated and so was not updated
selfupdate done!

dhcp2940:~ cmb21$ port search ghc
ghclang/ghc   6.4.2The  
Glorious

Glasgow Haskell Compilation System
ghc-devel  lang/ghc-devel 6.5  The  
Glorious

Glasgow Haskell Compilation System (development version)

dhcp2940:~ cmb21$

Am I doing something wrong?



No, just give the servers a few hours to run their update scripts.
Then the new portfiles will be available by selfupdate. (I confess I do
not know how often these days the scripts run, but it is at least a  
couple

of times per day, IIRC.)

If by, say,  UTC 28 Oct 2006 you don't see the new portfiles, let  
me know.

Something might be wacky with the server.

Sorry for the delay.

Best Wishes,
Greg


Kind regards,

Chris Brown,



On Fri, 27 Oct 2006, Gregory Wright wrote:



Hi,

GHC 6.6 is now available for OS X systems on both Intel and PowerPC
processors using the MacPorts infrastructure.

The compiler is built from source, using a binary bootstrap compiler.
OS X
versions 10.3 (Panther) and 10.4 (Tiger) are supported for PowerPC
processors;
for Intel processors, version 10.4.

MacPorts (formerly Darwinports) is a packaging system for managing
builds of unix-compatible software on OS X.  For more information on
MacPorts,
see

http://www.macports.org/

A new ghc-devel port will soon be available for those who just have
to live on the bleeding edge.


Best Wishes,
Greg

Gregory Wright
Antiope Associates LLC
[EMAIL PROTECTED]

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


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


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


Re: seq vs. pseq

2006-10-27 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote:

 The difference is subtle.  The semantics of seq and pseq are
 identical; however,  GHC can see that seq is strict in both its
 arguments and hence could choose to  evaluate them in either order,
 whereas pseq is only strict in its first argument  as far as the
 strictness analyser is concerned.  The point is that pseq is  useful
 for controlling evaluation order, which is what you want for adding 
 parallelism to a program.  seq, on the other hand, is not useful for
 controlling  evaluation order.

This is a rather weird thing, and I would consider it a bug in the
Haskell Report, rather than a bug in ghc.  (It bites hard when you are
trying to implement something like HPC.)

The very name 'seq' surely suggests that you are controlling the
evaluation order.  Please evaluate this thing on the left first.  But
that is _not_ what the Haskell Report says!  Ghc takes the Report
literally, and so the thing on the right is just as likely to be
evaluated before the thing on the left!

Surely the language designers did not intend this consequence.  For
Haskell-prime, can we fix this bug, and ensure that 'seq' really implies
ordering of evaluation?

[ If you just want strictness annotations, with the compiler free to
  reorder computations, I would say ($!) is a better bet, and could be
  redefined to use not the natural `seq`, but the strict-in-both-arguments
  variation. ]

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


Re: GHC 6.6 for OS X using MacPorts

2006-10-27 Thread Aaron Tomb

Hello,

The Portfile has made it to the servers, but installation doesn't  
complete successfully for me (on Intel/10.4.8). The first issue is  
that something happens to the dynamic library lookup path so the  
configure check for a working C compiler fails with a dyld error. I  
managed to fix this with the following:


  cd /usr
  mkdir i686-apple-darwin8
  cd i686-apple-darwin8
  ln -s ../lib

This allows configure to complete, but then it seems to have trouble  
finding the bootstrap compiler. I've attached the entire output,  
since I think context is important. If it seems more appropriate for  
this discussion to continue on the MacPorts mailing list, let me know.


Aaron



ghc-macports.log
Description: Binary data


On Oct 27, 2006, at 6:59 AM, Gregory Wright wrote:



Hi,

GHC 6.6 is now available for OS X systems on both Intel and PowerPC
processors using the MacPorts infrastructure.

The compiler is built from source, using a binary bootstrap  
compiler. OS X
versions 10.3 (Panther) and 10.4 (Tiger) are supported for PowerPC  
processors;

for Intel processors, version 10.4.

MacPorts (formerly Darwinports) is a packaging system for managing
builds of unix-compatible software on OS X.  For more information  
on MacPorts,

see

http://www.macports.org/

A new ghc-devel port will soon be available for those who just have
to live on the bleeding edge.


Best Wishes,
Greg

Gregory Wright
Antiope Associates LLC
[EMAIL PROTECTED]

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


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


OpenGL failing with Mac Intel 6.6 distribution

2006-10-27 Thread Deborah Goldsmith
I'm attempting to build frag on Mac OS X Intel with the 6.6  
distribution, and I hit the following:


/tmp/ghc25850_0/ghc25850_0.hc:5:22:
 error: HsOpenGL.h: No such file or directory

A comparison of the C include directories for 6.6 and a recent 6.5  
build gives:


$ diff -r /usr/local/lib/ghc-6.5.20061008/include/ /usr/local/lib/ 
ghc-6.6/include/

Only in /usr/local/lib/ghc-6.5.20061008/include/: HsOpenGL.h
Only in /usr/local/lib/ghc-6.5.20061008/include/: HsOpenGLExt.h
Only in /usr/local/lib/ghc-6.5.20061008/include/: HsOpenGLTypes.h
Only in /usr/local/lib/ghc-6.6/include/: HsReadline.h
Only in /usr/local/lib/ghc-6.6/include/: HsReadlineConfig.h
diff -r /usr/local/lib/ghc-6.5.20061008/include/ghcautoconf.h /usr/ 
local/lib/ghc-6.6/include/ghcautoconf.h

130c130
 #define HAVE_LIBIBERTY 1
---
 /* #undef HAVE_LIBIBERTY */

Is the fact that HSOpenGL*.h is missing in 6.6 expected?

Thanks,
Deborah

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