RE: RULES/SPECIALIZE not parsing:

2002-12-04 Thread Simon Marlow

 Rules.hs:
 
 module Rules where
 
 my_id :: a - a
 my_id a = a
 
 my_int_id :: Int - Int
 my_int_id a = a
 
 {-# RULES my_id = my_int_id #-}

Each rule should begin with a string, like:

  {-# RULES my_id my_id = my_int_id #-}

 {-# SPECIALIZE my_id :: Int - Int = my_int_id #-}

These kind of specialise pragmas aren't supported any more, because the
same effect can be achieved using RULES (it looks like that's what you
were trying to do).

The docs have some bogusness, which I'll fix.

Cheers,
Simon

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



[ ghc-Bugs-648783 ] Compile error for HsNet.h

2002-12-04 Thread noreply
Bugs item #648783, was opened at 2002-12-04 19:07
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=648783group_id=8032

Category: hslibs/net
Group: 5.04.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Compile error for HsNet.h

Initial Comment:
libraries/network/Network/BSD.hsc fails to compile on
RedHat 6.2 (GNU libc 2.1.3) due to an unknown type
in_addr_t in HsNet.h:

../../ghc/utils/hsc2hs/hsc2hs-inplace -Iinclude -I.  
Network/BSD.hsc
In file included from BSD.hsc:99:
include/HsNet.h:77: parse error before `addr'
include/HsNet.h: In function `my_inet_ntoa':
include/HsNet.h:80: `addr' undeclared (first use in
this function)
include/HsNet.h:80: (Each undeclared identifier is
reported only once
include/HsNet.h:80: for each function it appears in.)
make[2]: *** [Network/BSD.hs] Error 1
make[1]: *** [boot] Error 1
make[1]: Leaving directory
`/usr/src/fptools-5.04/libraries'
make: *** [all] Error 1


5.04.1 had a check for this:

#ifndef HAVE_IN_ADDR_T
typedef u_int32_t   in_addr_t;
#endif

This has been removed in 5.04.2.

-- 
Glynn Clements [EMAIL PROTECTED]



--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=648783group_id=8032
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Simon Marlow

   ==
The (Interactive) Glasgow Haskell Compiler -- version 5.04.2
   ==

We are pleased to announce a new patchlevel release of the Glasgow
Haskell Compiler (GHC), version 5.04.2.  This is a bugfix-only
release.  For all the changes since 5.02.3, see the release notes:

   http://www.haskell.org/ghc/docs/latest/users_guide/release-5-04.html


How to get it
~
The easy way is to go to the WWW page, which should be self-explanatory:

http://www.haskell.org/ghc/

We supply binary builds in the native package format for various
flavours of Linux and BSD, and in InstallShield form for Windows
folks.  Binary builds for other platforms are available as a .tar.gz
which can be installed wherever you want.  The source distribution is
also available from the same place.

Once you have the distribution, please follow the pointers in the
README file to find all of the documentation about this release.


Background
~~
Haskell is a standard lazy functional programming language; the
current language version is Haskell 98, agreed in December 1998.

GHC is a state-of-the-art programming suite for Haskell.  Included is
an optimising compiler generating good code for a variety of
platforms, together with an interactive system for convenient, quick
development.  The distribution includes space and time profiling
facilities, a large collection of libraries, and support for various
language extensions, including concurrency, exceptions, and foreign
language interfaces (C, whatever).  GHC is distributed under a
BSD-style open source license.

A wide variety of Haskell related resources (tutorials, libraries,
specifications, documentation, compilers, interpreters, references,
contact information, links to research groups) are available from the
Haskell home page (see below).


On-line GHC-related resources
~~

Relevant URLs on the World-Wide Web:

GHC home page http://www.haskell.org/ghc/
Haskell home page http://www.haskell.org/
comp.lang.functional FAQ  http://www.cs.nott.ac.uk/~gmh/faq.html



System requirements
~~~
To compile programs with GHC, you need a machine with 64+MB memory, GCC
and perl. This release is known to work on the following platforms:

  * i386-unknown-{linux,*bsd,mingw32}
  * sparc-sun-solaris2
  * alpha-dec-osf3
  * powerpc-apple-darwin (MacOS/X)

Ports to the following platforms should be relatively easy (for a
wunderhacker), but haven't been tested due to lack of time/hardware:

  * hppa1.1-hp-hpux{9,10}
  * i386-unknown-solaris2
  * mips-sgi-irix{5,6}
  * {rs6000,powerpc}-ibm-aix

The builder's guide on the web site gives a complete run-down of what
ports work; it can be found at

   http://www.haskell.org/ghc/docs/latest/building/building-guide.html


Mailing lists
~
We run mailing lists for GHC users and bug reports; to subscribe, use
the web interfaces at

http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

There are several other haskell and ghc-related mailing lists on
www.haskell.org; for the full list, see

http://www.haskell.org/mailman/listinfo/

Please report bugs using our SourceForge page at

http://sourceforge.net/projects/ghc/

or send them to [EMAIL PROTECTED]

GHC users hang out on [EMAIL PROTECTED]  Bleeding
edge CVS users party on [EMAIL PROTECTED]

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



Re: ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Jyrinx


We are pleased to announce a new patchlevel release of the Glasgow
Haskell Compiler (GHC), version 5.04.2.  This is a bugfix-only
release.  For all the changes since 5.02.3, see the release notes:

  http://www.haskell.org/ghc/docs/latest/users_guide/release-5-04.html
 

Looks like that link's broken; should it be this?

http://www.haskell.org/ghc/docs/latest/html/users_guide/release-5-04.html

(Seems like the html is missing.)

Jyrinx
[EMAIL PROTECTED]

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



RE: ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Simon Marlow

==
 The (Interactive) Glasgow Haskell Compiler -- version 5.04.2
==
 
 We are pleased to announce a new patchlevel release of the Glasgow
 Haskell Compiler (GHC), version 5.04.2.  This is a bugfix-only
 release.  For all the changes since 5.02.3, see the release notes:
 

 http://www.haskell.org/ghc/docs/latest/users_guide/release-5-04.html

Oops, that URL should be 

 
http://www.haskell.org/ghc/docs/latest/html/users_guide/release-5-04.htm
l

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



±Ð±z¦p¦ó¦¨¬°ºô¸ô¤uµ{®v

2002-12-04 Thread mlpi_uy_rff3d1w







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


Re: ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Sigbjorn Finne

Simon Marlow [EMAIL PROTECTED] writes:
 
  ==
 The (Interactive) Glasgow Haskell Compiler -- version 5.04.2
  ==
 
   ...

 
A Win32 installer is now available via the downloads page

 http://haskell.org/ghc/download_ghc_504.html

The installer this time also includes ObjectIO.

--sigbjorn

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



ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Simon Marlow

   ==
The (Interactive) Glasgow Haskell Compiler -- version 5.04.2
   ==

We are pleased to announce a new patchlevel release of the Glasgow
Haskell Compiler (GHC), version 5.04.2.  This is a bugfix-only
release.  For all the changes since 5.02.3, see the release notes:

   http://www.haskell.org/ghc/docs/latest/users_guide/release-5-04.html


How to get it
~
The easy way is to go to the WWW page, which should be self-explanatory:

http://www.haskell.org/ghc/

We supply binary builds in the native package format for various
flavours of Linux and BSD, and in InstallShield form for Windows
folks.  Binary builds for other platforms are available as a .tar.gz
which can be installed wherever you want.  The source distribution is
also available from the same place.

Once you have the distribution, please follow the pointers in the
README file to find all of the documentation about this release.


Background
~~
Haskell is a standard lazy functional programming language; the
current language version is Haskell 98, agreed in December 1998.

GHC is a state-of-the-art programming suite for Haskell.  Included is
an optimising compiler generating good code for a variety of
platforms, together with an interactive system for convenient, quick
development.  The distribution includes space and time profiling
facilities, a large collection of libraries, and support for various
language extensions, including concurrency, exceptions, and foreign
language interfaces (C, whatever).  GHC is distributed under a
BSD-style open source license.

A wide variety of Haskell related resources (tutorials, libraries,
specifications, documentation, compilers, interpreters, references,
contact information, links to research groups) are available from the
Haskell home page (see below).


On-line GHC-related resources
~~

Relevant URLs on the World-Wide Web:

GHC home page http://www.haskell.org/ghc/
Haskell home page http://www.haskell.org/
comp.lang.functional FAQ  http://www.cs.nott.ac.uk/~gmh/faq.html



System requirements
~~~
To compile programs with GHC, you need a machine with 64+MB memory, GCC
and perl. This release is known to work on the following platforms:

  * i386-unknown-{linux,*bsd,mingw32}
  * sparc-sun-solaris2
  * alpha-dec-osf3
  * powerpc-apple-darwin (MacOS/X)

Ports to the following platforms should be relatively easy (for a
wunderhacker), but haven't been tested due to lack of time/hardware:

  * hppa1.1-hp-hpux{9,10}
  * i386-unknown-solaris2
  * mips-sgi-irix{5,6}
  * {rs6000,powerpc}-ibm-aix

The builder's guide on the web site gives a complete run-down of what
ports work; it can be found at

   http://www.haskell.org/ghc/docs/latest/building/building-guide.html


Mailing lists
~
We run mailing lists for GHC users and bug reports; to subscribe, use
the web interfaces at

http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

There are several other haskell and ghc-related mailing lists on
www.haskell.org; for the full list, see

http://www.haskell.org/mailman/listinfo/

Please report bugs using our SourceForge page at

http://sourceforge.net/projects/ghc/

or send them to [EMAIL PROTECTED]

GHC users hang out on [EMAIL PROTECTED]  Bleeding
edge CVS users party on [EMAIL PROTECTED]

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Jyrinx


We are pleased to announce a new patchlevel release of the Glasgow
Haskell Compiler (GHC), version 5.04.2.  This is a bugfix-only
release.  For all the changes since 5.02.3, see the release notes:

  http://www.haskell.org/ghc/docs/latest/users_guide/release-5-04.html
 

Looks like that link's broken; should it be this?

http://www.haskell.org/ghc/docs/latest/html/users_guide/release-5-04.html

(Seems like the html is missing.)

Jyrinx
[EMAIL PROTECTED]

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



RE: ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Simon Marlow

==
 The (Interactive) Glasgow Haskell Compiler -- version 5.04.2
==
 
 We are pleased to announce a new patchlevel release of the Glasgow
 Haskell Compiler (GHC), version 5.04.2.  This is a bugfix-only
 release.  For all the changes since 5.02.3, see the release notes:
 

 http://www.haskell.org/ghc/docs/latest/users_guide/release-5-04.html

Oops, that URL should be 

 
http://www.haskell.org/ghc/docs/latest/html/users_guide/release-5-04.htm
l

Cheers,
Simon
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Oops, another H'98 report error.

2002-12-04 Thread Malcolm Wallace
I know it is no far too late to do anything about it, but I just
discovered another error in the Haskell'98 Libraries Report.

The Time module exports all but one of the fieldnames of the
CalendarTime datatype, bizarrely omitting ctSec.

Regards,
Malcolm
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Design patterns in Haskell

2002-12-04 Thread Keith Wansbrough
 I spent an awful lot of time doing a brain-dump into these pages and am a 
 bit dissapointed that they seemed to have dissappeared without
 trace. Were these archived anywhere

Yes, they are in fact still there (they are all in RCS).  The problem is, the Wiki is 
broken.  I'm going to try and restore the pages statically for the moment (i.e., 
non-editable), and then look at how to make them work properly.  Assistance welcome!

--KW 8-)
-- 
Keith Wansbrough [EMAIL PROTECTED]
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Design patterns in Haskell

2002-12-04 Thread Chris . Angus

I spent an awful lot of time doing a brain-dump into these pages and am a bit dissapointed that they seemed to have dissappeared without
trace. Were these archived anywhere







Keith Wansbrough [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
03/12/2002 18:02


To:matt hellige [EMAIL PROTECTED]
cc:[EMAIL PROTECTED], (bcc: Chris Angus/Lawson)
Subject:Re: Design patterns in Haskell


 size. while there's really no substitute for experience, i really
 believe we could benefit from some patterns.

There was a list of design patterns for Haskell on the Wiki (back in
the days when it worked):

http://haskell.org/wiki/wiki?CommonHaskellIdioms

--KW 8-)
-- 
Keith Wansbrough [EMAIL PROTECTED]
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell




stupid strictness question

2002-12-04 Thread Hal Daume III
i know i know, this has been asked a million times, but i was searching
through the archives with no success, so i figured i'd bug you guys.

according to the report:

  A declaration of the form 

data cx = T u1 ... uk = ... | K s1 ... sn | ... 

  where each si is either of the form ! ti or ti, replaces every 
  occurance of K in an expression by 

(\x1 ... xn - ( ((K op1 x1) op2 x2) ... ) opn xn) 

  where opi is the lazy apply function $ if si is of the form ti, 
  and opi is the strict apply function $! (see Section 6.2) if si 
  is of the form !ti. Pattern matching on K is not affected by
  strictness flags. 

so.  we define:

 data L = L  Int deriving Show
 data S = S !Int deriving Show

and, as expected, we get:

*Strict L undefined
L *** Exception: Prelude.undefined
*Strict L $! undefined
*** Exception: Prelude.undefined
*Strict S undefined
*** Exception: Prelude.undefined

Now, we define:

 data SMaybe a = SNothing | SJust !a  deriving Show

Now, we run:

*Strict Just (undefined::Int)
Just *** Exception: Prelude.undefined
*Strict Just $! (undefined::Int)
*** Exception: Prelude.undefined
*Strict SJust $! (undefined::Int)
*** Exception: Prelude.undefined
*Strict SJust (undefined::Int)
SJust *** Exception: Prelude.undefined

I can't figure out why this last one is different from the one before it,
or the one before that.  Interestingly, Hugs disagrees (the previous was
with ghc 5.04.1):

Strict Just (undefined::Int)
Just 
Program error: {undefined}
Strict Just $! (undefined::Int)
Program error: {undefined}
Strict SJust $! (undefined::Int)
Program error: {undefined}
Strict SJust (undefined::Int)
Program error: {undefined}

Which is what I expected.  Can someone clarify here?

 - Hal

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Sigbjorn Finne

Simon Marlow [EMAIL PROTECTED] writes:
 
  ==
 The (Interactive) Glasgow Haskell Compiler -- version 5.04.2
  ==
 
   ...

 
A Win32 installer is now available via the downloads page

 http://haskell.org/ghc/download_ghc_504.html

The installer this time also includes ObjectIO.

--sigbjorn

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



actions

2002-12-04 Thread Nuno Silva
I'm using an action that generates a random number, for the user to discover it. each time he guesses, if the number is diferent that the one generated, it is suposed to call itself again to try again, but each time I call it, it generates the number again.
how can I overcome this?
sample of the code:
descodificador = do c1 - gera   c2 - gera   c3 - gera   c4 - gera 
 "code in the middle to check if the number is equal"
 if not than go down...
 descodificador

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: actions

2002-12-04 Thread Nick Name
On Wed, 4 Dec 2002 05:54:43 -0800 (PST)
Nuno Silva [EMAIL PROTECTED] wrote:

 descodificador  =   do c1 - gera
 c2 - gera
 c3 - gera
 c4 - gera 
 
code in the middle to check if the
number is equal 
 
 if not than go down... 
 
 descodificador 


Perhaps it's better to post the real code. Mind code layout first, and
if you create the random generator OUTSIDE the descodificador and use
one of the pure functions (not actions) to get a random number from it,
like random, and reuse THE SAME generator, you will always get the
same number.

You can use the new generator obtained as the second element of the
resulting couple from the function random or the infinite list of
random numbers obtained with the function randoms

Vincenzo
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe