RE: @-bindings broken in 6.0?

2003-06-18 Thread Simon Peyton-Jones
Yes, I'm afraid so.  With -fglasgow-exts Template Haskell captures
[t|  ...  |]
and
[p| ... |]
and similarly [d| and [e| 
for quotations. I don't think I'd fully realised that this conflicts
with list comprehensions
[t|t-ts]

(I remember reading a book when I was 10 featuring kids trying to decode
a message that was in two parts mac .. and hine.   Took me ages to
spot machine.)


But maybe this isn't what you found?Better syntax here would be
welcome if anyone can think of some. 

Simon

| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
| On Behalf Of John Meacham
| Sent: 18 June 2003 03:24
| To: [EMAIL PROTECTED]
| Subject: @-bindings broken in 6.0?
| 
| change in list comprehension parsing?
| after I upgraded to ghc 6.0 there were some odd syntax errors on list
| comprehensions which i did not get before, making sure i put spaces
| between all symbols seems to fix them.. was something changed about
how
| they are parsed which breaks code that used to work? just curious.
| John
| --
|

---
| John Meacham - California Institute of Technology, Alum. -
[EMAIL PROTECTED]
|

---
| ___
| Glasgow-haskell-users mailing list
| [EMAIL PROTECTED]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: @-bindings broken in 6.0?

2003-06-18 Thread John Meacham
yes. I use 't' as a variable rather often in this context. and
-fglasgow-exts.  that seems to be it. perhaps it should not interpret it
as the special quotation if the comprehension doesn't end with |]?
John

On Wed, Jun 18, 2003 at 09:04:42AM +0100, Simon Peyton-Jones wrote:
 Yes, I'm afraid so.  With -fglasgow-exts Template Haskell captures
   [t|  ...  |]
 and
   [p| ... |]
 and similarly [d| and [e| 
 for quotations. I don't think I'd fully realised that this conflicts
 with list comprehensions
   [t|t-ts]
 
 (I remember reading a book when I was 10 featuring kids trying to decode
 a message that was in two parts mac .. and hine.   Took me ages to
 spot machine.)
 
 
 But maybe this isn't what you found?Better syntax here would be
 welcome if anyone can think of some. 
 
 Simon
 
 | -Original Message-
 | From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 | On Behalf Of John Meacham
 | Sent: 18 June 2003 03:24
 | To: [EMAIL PROTECTED]
 | Subject: @-bindings broken in 6.0?
 | 
 | change in list comprehension parsing?
 | after I upgraded to ghc 6.0 there were some odd syntax errors on list
 | comprehensions which i did not get before, making sure i put spaces
 | between all symbols seems to fix them.. was something changed about
 how
 | they are parsed which breaks code that used to work? just curious.
 | John
 | --
 |
 
 ---
 | John Meacham - California Institute of Technology, Alum. -
 [EMAIL PROTECTED]
 |
 
 ---
 | ___
 | Glasgow-haskell-users mailing list
 | [EMAIL PROTECTED]
 | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
 
 
 ___
 Glasgow-haskell-users mailing list
 [EMAIL PROTECTED]
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
 

-- 
---
John Meacham - California Institute of Technology, Alum. - [EMAIL PROTECTED]
---
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: How do I find out a function's strictness?

2003-06-18 Thread Sven Panne
Francis Girard wrote:
 [...] Notice however that if I compile with the -prof -auto-all -O
 flags then I got the following error message when I try to examine
 the interface file (with --show-iface) :

 mismatched interface file versions: expected 5043, found 5043p
This has been fixed in GHC 6.x, as a workaround you can use the
undocumented option -buildtag p *before* --show-iface, e.g.
   ghc -buildtag p --show-iface Foo.p_hi

Cheers,
   S.
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: 5.04.3: update_fwd: unknown/strange object

2003-06-18 Thread Simon Marlow
 
 It occurs that we need first to install  ghc-6.0 
 on 
i386-unknown, RedHat Linux platform.
 
 Our administrator says here is a difficulty: 
 
 a) it is hard for us to install from sources,
 b) binary RPM would not do, due to library versions etc.,
 c) we need  
source RPM  distributive,
 
similar as we used when installing  ghc-5.04.3.
 
But  ghc-6.0  does not show any source RPM distributive.
 
 Please, what can we do about this?

Use the nosrc RPM, or install locally in your home directory from the
binary distribution?  (you don't say what version of RedHat you have).

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


TH-Syntax (Re: @-bindings broken in 6.0?)

2003-06-18 Thread Christian Maeder
I think symbols instead of letters in quotations would be better

	[t|  ...  |]
[::| ... |]   (but check [::| before a parallel array [::] )

and
[p| ... |]
[@| ... |]

and similarly [d| 
[{}| ... ]

[e|? That's simply [| ... |]

Christian



___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: isEmptyChan blocks?

2003-06-18 Thread Simon Marlow
 
 I noticed that isEmptyChan blocks if the channel is already
 waited on by readChan, is this the intended behaviour?
 At least I was a bit surprised by a blocking predicate..

I agree this doesn't seem right.  Looking at the implementation though,
I can't see an easy way to fix it - any suggestions?

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


source RPM ghc-6.0

2003-06-18 Thread Serge D. Mechveliani
On Wed, Jun 18, 2003 at 11:40:59AM +0100, Simon Marlow wrote:
  
  It occurs that we need first to install  ghc-6.0 
  on 
 i386-unknown, RedHat Linux platform.
  
  Our administrator says here is a difficulty: 
  
  a) it is hard for us to install from sources,
  b) binary RPM would not do, due to library versions etc.,
  c) we need  
 source RPM  distributive,
  
 similar as we used when installing  ghc-5.04.3.
  
 But  ghc-6.0  does not show any source RPM distributive.
  
  Please, what can we do about this?
 


 Use the nosrc RPM, or install locally in your home directory from the
 binary distribution?  (you don't say what version of RedHat you have).
 


Is this a correct way to detect versions needed for the GHC 
installation? 

  more /etc/redhat-release
  --
  Red Hat Linux release 7.3 (Valhalla)

  ls /lib/libc*  
  --
  /lib/libc-2.2.5.so 
 ... 



 install locally in your home directory from the binary 
 distribution?

Probably, our Linux and library versions are too old to install from 
the binary ghc-6.0 distribution.
Or should I really try this, with the above versions?

This is why we rather need  source RPM,  as our administrator says

(he does not want to update versions too often, 
and personally, I do not understand any in these system matters).

-
Serge Mechveliani
[EMAIL PROTECTED]


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: source RPM ghc-6.0

2003-06-18 Thread Simon Marlow
 Is this a correct way to detect versions needed for the GHC 
 installation? 
 
   more /etc/redhat-release
   --
   Red Hat Linux release 7.3 (Valhalla)
 
   ls /lib/libc*  
   --
   /lib/libc-2.2.5.so 
  ... 

The binary distribution (not the RPM) is basically just a tarball.  It
does no checking that you have the right versions of things, so it is a
use at your own risk.  The download instructions do say that it is
suitable for RedHat 7.2, though, so you might be ok with 7.3.

If you want to build from source, you can use the nosrc RPM.  This is
just like the source RPM, except that the source isn't included.  To
build it, you need to download the source too (your sysadmin should know
how to do this).

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


current CVS version doesn't compile

2003-06-18 Thread Peter Simons
I'm trying to compile the latest version of GHC from CVS on Linux, but
the build reproducibly fails at this point:

main/SysTools.lhs:703:
Couldn't match `IO ExitCode' against `t - t1'
Expected type: IO ExitCode
Inferred type: t - t1
Probable cause: `rawSystem' is applied to too many arguments in the call
(rawSystem pgm real_args)
In a 'do' expression: exit_code - rawSystem pgm real_args
make[2]: *** [stage1/main/SysTools.o] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/local/src/ghc-current/ghc'

Does anyone have an idea what's going wrong here?

Peter

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: @-bindings broken in 6.0?

2003-06-18 Thread Ketil Z. Malde
Simon Peyton-Jones [EMAIL PROTECTED] writes:

 Yes, I'm afraid so.  With -fglasgow-exts Template Haskell captures
   [t|  ...  |]
 and
   [p| ... |]
 and similarly [d| and [e| 
 for quotations.

I had a similar experience when I defined the (?) operator.  Which
obviously clashes with the syntax for implicit paramters, unless
surrounded by spaces.

 But maybe this isn't what you found?Better syntax here would be
 welcome if anyone can think of some. 

I think lumping all these extensions under one switch is the
problem.  I find it hard to do useful stuff without some extensions,
but would rather not be bitten by this kind of things.

Isn't it possible to provide e.g. implicit parameters and template
Haskell as magical modules?  So that import Template enables the
syntax above, and I could use import MultiParameterTCs but not
ImplicitParams, for instance?

Or at least, provide different -fglasgow-exts flags to fine tune which
extensions are being used.

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: current CVS version doesn't compile

2003-06-18 Thread Simon Marlow
 
 I'm trying to compile the latest version of GHC from CVS on Linux, but
 the build reproducibly fails at this point:
 
 main/SysTools.lhs:703:
 Couldn't match `IO ExitCode' against `t - t1'
 Expected type: IO ExitCode
 Inferred type: t - t1
 Probable cause: `rawSystem' is applied to too many 
 arguments in the call
 (rawSystem pgm real_args)
 In a 'do' expression: exit_code - rawSystem pgm real_args
 make[2]: *** [stage1/main/SysTools.o] Error 1
 make[1]: *** [all] Error 1
 make[1]: Leaving directory `/usr/local/src/ghc-current/ghc'
 
 Does anyone have an idea what's going wrong here?

What version of GHC are you compiling with?

Cheers,
Simon
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: current CVS version doesn't compile

2003-06-18 Thread Peter Simons
Simon Marlow writes:

  What version of GHC are you compiling with?

The Glorious Glasgow Haskell Compilation System, version 6.1

I built this version from CVS as well, maybe two or three days before
the 6.0 version was released.

Peter
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: current CVS version doesn't compile

2003-06-18 Thread Simon Marlow
 
 Simon Marlow writes:
 
   What version of GHC are you compiling with?
 
 The Glorious Glasgow Haskell Compilation System, version 6.1
 
 I built this version from CVS as well, maybe two or three days before
 the 6.0 version was released.

We only support compiling the CVS sources with:

  a. A released compiler (i.e. one ending in an even number), or
  b. itself.

So, building with a random 6.1 isn't supported, hence the build error.
You should start from 6.0.

Cheers,
Simon
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: @-bindings broken in 6.0?

2003-06-18 Thread Andy Moran
On Wednesday 18 June 2003 01:04 am, Simon Peyton-Jones wrote:

 Better syntax here would be welcome if anyone can think of some.

Why not add a '|' after the initial '[':

[|t|  ...  |]
and
[|p| ... |]

It may be a little more heavyweight but it is symmetrical (and probably makes 
parsing easier too).

I haven't played with Template Haskell at all, so I don't know if '[|' is 
already a distinguished token.

Cheers,

Andy

-- 
Andy Moran  Ph.  (503) 526 3472
Galois Connections Inc. Fax. (503) 350 0833
3875 SW Hall Blvd.http://www.galois.com
Beaverton, OR 97005[EMAIL PROTECTED]

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


state of ghc6 on sparc

2003-06-18 Thread Isaac Jones
Hello :)

Can anyone enlighten me as to the state of the ghc6 sparc
distribution?  The file on Hal's web page mentioned some time back is
not the same file as on the GHC web page (I note that the filenames
are different also).

Are any of them known to work if installed in a non-standard place?


peace,

isaac
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: state of ghc6 on sparc

2003-06-18 Thread Josef Svenningsson
On Wed, 18 Jun 2003, Isaac Jones wrote:

 Hello :)

 Can anyone enlighten me as to the state of the ghc6 sparc
 distribution?  The file on Hal's web page mentioned some time back is
 not the same file as on the GHC web page (I note that the filenames
 are different also).

 Are any of them known to work if installed in a non-standard place?

Here at Chalmers we use the first shipped version (I believe this is the
one on the GHC web page or an even earlier one...). I patched it myself,
it was very easy. I expect that the version on Hal's web page should work
since he said he fixed the bug.

The only thing that I don't like is that the dist isn't compiled with
readline. It makes working in ghci a nightmare (I need to use backspace
often...). The problem around this is in my opinion to make a Haskell98
compliant trimmed down readline library which doesn't depend on the c
library. It shouldn't be too difficult. I don't expect that people are
using the full power of readline anyway.

Cheers,

/Josef

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: state of ghc6 on sparc

2003-06-18 Thread Simon Marlow
 
 On Wed, 18 Jun 2003, Isaac Jones wrote:
  Can anyone enlighten me as to the state of the ghc6 sparc
  distribution?  The file on Hal's web page mentioned some 
 time back is
  not the same file as on the GHC web page (I note that the filenames
  are different also).
 
  Are any of them known to work if installed in a non-standard place?
 
 Here at Chalmers we use the first shipped version (I believe 
 this is the
 one on the GHC web page or an even earlier one...). I patched 
 it myself,
 it was very easy. I expect that the version on Hal's web page 
 should work since he said he fixed the bug.

Hal's version still has problems, I believe.  He said that he will try
to fix the problems soon.

 The only thing that I don't like is that the dist isn't compiled with
 readline. It makes working in ghci a nightmare (I need to use 
 backspace
 often...). The problem around this is in my opinion to make a 
 Haskell98
 compliant trimmed down readline library which doesn't depend on the c
 library. It shouldn't be too difficult. I don't expect that people are
 using the full power of readline anyway.

Making a working readline isn't that simple - you need to know something
about the terminal properties for one, which means being able to use
termcap or terminfo.

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users