comprehension vs `map'

2009-05-15 Thread Serge D. Mechveliani
Dear GHC team,

I would like to write 
 [rl {ruleMode = AlwaysApply} | rl - rules calc](I)

instead of   map (\ rl - rl {ruleMode = AlwaysApply}) $ rules calc  (II)
and instead of
  let rs = rules calc in  [rl {ruleMode = AlwaysApply} | rl - rs]  (III).

But is this reliable in GHC that the compiler converts (I) into something 
which is not not worse than III ?
What about other implementations?

Regards,

---
Mechveliani
mech...@botik.ru


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


Re: [Haskell] Re: ANNOUNCE: GHC version 6.10.3

2009-05-15 Thread Simon Marlow

On 15/05/2009 05:52, Benjamin L.Russell wrote:

What happened to the Windows installation section in the corresponding
User's Guide?  The User's Guide for GHC version 6.10.2 (see
http://www.haskell.org/ghc/docs/6.10.2/html/users_guide/index.html)
had section 2.2: Installing on Windows (see
http://www.haskell.org/ghc/docs/6.10.2/html/users_guide/install-windows.html#winfaq),
but this section seems to be missing in the corresponding document for
version 6.10.3 (see
http://www.haskell.org/ghc/docs/latest/html/users_guide/index.html).
Not only that, but the entire chapter 2: Installing GHC seems to be
missing.


The Installing GHC section was mostly out-of-date and wrong, so I 
removed it.  Some of the material, such as the section on the layout of 
the tree, has been updated and moved to the GHC Building Guide, here


http://hackage.haskell.org/trac/ghc/wiki/Building

We also have lots of information on the GHC web site about obtaining and 
installing GHC, so if we need anything else I think that would be the 
best place to put it.


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


RE: comprehension vs `map'

2009-05-15 Thread Simon Peyton-Jones
should generate the same code!

| -Original Message-
| From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users-
| boun...@haskell.org] On Behalf Of Serge D. Mechveliani
| Sent: 15 May 2009 09:00
| To: glasgow-haskell-users@haskell.org
| Subject: comprehension vs `map'
|
| Dear GHC team,
|
| I would like to write
|  [rl {ruleMode = AlwaysApply} | rl - rules calc](I)
|
| instead of   map (\ rl - rl {ruleMode = AlwaysApply}) $ rules calc  (II)
| and instead of
|   let rs = rules calc in  [rl {ruleMode = AlwaysApply} | rl - rs]  (III).
|
| But is this reliable in GHC that the compiler converts (I) into something
| which is not not worse than III ?
| What about other implementations?
|
| Regards,
|
| ---
| Mechveliani
| mech...@botik.ru
|
|
| ___
| 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: [Haskell] Re: ANNOUNCE: GHC version 6.10.3

2009-05-15 Thread Benjamin L . Russell
On Fri, 15 May 2009 09:16:13 +0100, Simon Marlow marlo...@gmail.com
wrote:

On 15/05/2009 05:52, Benjamin L.Russell wrote:
 What happened to the Windows installation section in the corresponding
 User's Guide?  The User's Guide for GHC version 6.10.2 (see
 http://www.haskell.org/ghc/docs/6.10.2/html/users_guide/index.html)
 had section 2.2: Installing on Windows (see
 http://www.haskell.org/ghc/docs/6.10.2/html/users_guide/install-windows.html#winfaq),
 but this section seems to be missing in the corresponding document for
 version 6.10.3 (see
 http://www.haskell.org/ghc/docs/latest/html/users_guide/index.html).
 Not only that, but the entire chapter 2: Installing GHC seems to be
 missing.

The Installing GHC section was mostly out-of-date and wrong, so I 
removed it.  Some of the material, such as the section on the layout of 
the tree, has been updated and moved to the GHC Building Guide, here

http://hackage.haskell.org/trac/ghc/wiki/Building

We also have lots of information on the GHC web site about obtaining and 
installing GHC, so if we need anything else I think that would be the 
best place to put it.

Ah, I see.

I just checked out that section, but although it includes information
about building GHC, it doesn't seem to include information about
simply installing GHC using a binary.  This could become an issue if a
new user unfamiliar with the installation suddenly decides to upgrade;
it is unclear without that documentation whether it is necessary to
uninstall the previous version first.

More specifically, section 2.2.2 Moving GHC Around indicates that
the entire GHC tree can be freely moved around just by copying the
c:/ghc/ghc-version directory (although it is necessary to fix up the
links in 'Start/All Programs/GHC/ghc-version' if this is done);
however, this information is not evident from the information provided
by the Windows installer.  This information initially led me to
conclude that uninstalling the previous version wasn't necessary to
upgrade; without this information, a new user may not be able to
determine whether uninstalling a previous version is necessary to
upgrade, and could make upgrading more confusing.

-- Benjamin L. Russell
-- 
Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Translator/Interpreter / Mobile:  +011 81 80-3603-6725
Furuike ya, kawazu tobikomu mizu no oto. 
-- Matsuo Basho^ 

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


--out-implib when linking shared libraries

2009-05-15 Thread Neil Mitchell
Hi,

I've just built a Haskell dll on Windows. As part of the process it
generated an 14Mb foo.dll, and a 40Mb foo.dll.a. Looking at the flags
passed to ld I see --out-implib=foo.dll.a. What is the purpose of the
.a file? What might it be needed for? Is it possible to suppress it?

I could easily be building 100 of these things and 4Gb of disk for
unused files is a little painful.

Thanks

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


Re: --out-implib when linking shared libraries

2009-05-15 Thread Duncan Coutts
On Fri, 2009-05-15 at 15:31 +0100, Neil Mitchell wrote:
 Hi,
 
 I've just built a Haskell dll on Windows. As part of the process it
 generated an 14Mb foo.dll, and a 40Mb foo.dll.a. Looking at the flags
 passed to ld I see --out-implib=foo.dll.a. What is the purpose of the
 .a file? What might it be needed for? Is it possible to suppress it?

I'm less familiar with the windows dlls as I've been working on the unix
case first, but as I understand it, .lib files serve a dual purpose as
static libs and as import libs for corresponding dlls. To add confusion
the windows gnu tools use the .dll.a extension rather than .lib which
the MS tools use.

It looks like what you're getting is an import lib that also contains a
full copy of all the code.

I think it's possible to have minimal .lib files that do not contain any
code and only refer to the corresponding dll. Further, I think recent
gnu ld versions can link directly against dlls without using an import
lib (though you may still need the import lib if you want to use MSVC to
link to your dll).

So my suggestion is remove it, if you're linking using gcc it should
work.

See also:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gnu-linker/win32.html

Duncan

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