RE: [Haskell-cafe] Somewhat random history question

2007-11-12 Thread Simon Peyton-Jones
| It's interesting that the article completely fails to mention hbc
| which I know they used during the GHC bootstrap.  Oh well. :)
|
| On Nov 11, 2007 2:41 PM, Richard Kelsall [EMAIL PROTECTED] wrote:
|  Andrew Coppin wrote:
|   ...if GHC is written in Haskell, how the heck did they compile GHC in
|   the first place?

Lennart, I'm sure this is my fault, and I do apologise.  If we used hbc in the 
bootstrap, I'd completely forgotten; I thought we'd just used the LML compiler, 
which is indeed credited.  (Perhaps not everyone knows that you wrote the LML 
compiler too, with Thomas Johnsson, of course.   It completely changed the 
landscape of lazy-functional-language compilers.)  What I do remember is that 
we constantly compared ghc's performance to hbc's, and took ages to catch up!

I wish we'd corrected any errors of fact before the paper was published.  (It 
was on the Web for 6 months before publication to accumulate corrections, but 
errors and omissions remain our fault.)

Simon

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Upgrading X11

2007-11-12 Thread jim burton
On Sun, 2007-11-11 at 12:44 -0500, Brent Yorgey wrote:

 
 I think you need to run autoconf  autoheader  (or autoreconf) first,
 before running Setup configure?  I could be confused, but see if that
 helps.  If that's what the problem is, the documentation definitely
 needs updating. 
 
 -Brent
 
 

Thanks Brent, autoconf  autoheader fixed it. I won't volunteer to look
at the docs because I have no idea why!

Jim

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-12 Thread Tony Finch
On Sun, 11 Nov 2007, [EMAIL PROTECTED] wrote:

 To be a true COBOL replacement, I think that one very important feature
 is that it is link-compatible with existing COBOL code.  You're never
 going to be able to replace a 6MLOC COBOL monster in any manner other
 than piecemeal.

AFAIK people are replacing code by writing other applications that
manipulate the same data as the legacy code but do not link with it. I
should ask my wife more about the structure of Peoplesoft. I know it's a
mixture of COBOL, PL/SQL, and Peoplecode on the server, and Java on the
client... No Haskell in it, though.

Tony.
-- 
f.a.n.finch  [EMAIL PROTECTED]  http://dotat.at/
WEST FAIR ISLE FAEROES SOUTHEAST ICELAND: SOUTHERLY VEERING NORTHWESTERLY 5 TO
7, OCCASIONALLY GALE 8 IN FAEROES AND SOUTHEAST ICELAND. ROUGH OR VERY ROUGH.
RAIN OR SHOWERS. MODERATE OR GOOD.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: [Haskell] GHC6.8.1 can not compile the simple example

2007-11-12 Thread Neil Mitchell
Hi David,

In future, please post emails to haskell-cafe@, the haskell@ list is
for annoucements.

The correct command line is: ghc --make c.hs

Thanks

Neil



On Nov 12, 2007 1:11 PM, david yu [EMAIL PROTECTED] wrote:
 Link error is:
 [EMAIL PROTECTED] test]$ ghc c.hs
 c.o: In function `rM7_info':
 (.text+0xaa): undefined reference to
 `containerszm0zi1zi0zi0_DataziMap_lookup_closure'
 c.o: In function `rMd_info':
 (.text+0x1fa): undefined reference to
 `containerszm0zi1zi0zi0_DataziMap_fromList_closure'
 c.o: In function `sVJ_info':
 (.text+0xa3b): undefined reference to
 `__stginit_containerszm0zi1zi0zi0_DataziMap_'
 c.o: In function `rM7_srt':
 (.data+0x18): undefined reference to
 `containerszm0zi1zi0zi0_DataziMap_lookup_closure'
 c.o: In function `rMd_srt':
 (.data+0x60): undefined reference to
 `containerszm0zi1zi0zi0_DataziMap_fromList_closure'
 collect2: ld returned 1 exit status

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


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell and html input elements

2007-11-12 Thread PR Stanley

Hi
back again!
How easy/hard is it to control a haskell program through a web browser?
Cheers
Paul

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and html input elements

2007-11-12 Thread Aaron Tomb


On Nov 12, 2007, at 8:38 AM, PR Stanley wrote:


Hi
back again!
How easy/hard is it to control a haskell program through a web  
browser?


Hi,

It depends on exactly how you want to control it, but at least some  
control is fairly easy.


If you simply want to start a batch Haskell program, and see its  
output as HTML in a browser, you can use the cgi [1] or fastcgi [2]  
libraries listed on Hackage.


If you want slightly more interactivity, it would make sense to write  
your Haskell program as its own web server (which is actually  
surprisingly easy) and have it respond to sequences of requests,  
perhaphs storing intermediate state along the way. Giving something  
like this a nice GUI on the user side will probably involve writing a  
certain amount of JavaScript. One example of a program that works  
this way is HERA [3], which is unfortunately not open-source at the  
moment, but may be some day. Another potentially useful library is  
HAppS [4], which abstracts out some of the functionality necessary  
for web-based applications.


Is this sort of thing along the right track, or were you thinking of  
something else?


Aaron

[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ 
cgi-3001.1.5.1
[2] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ 
fastcgi-3001.0.1
[3] http://haskell.org/haskellwiki/ 
Haskell_Equational_Reasoning_Assistant
[4] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ 
HAppS-0.8.4

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and html input elements

2007-11-12 Thread Neil Mitchell
Hi

 If you simply want to start a batch Haskell program, and see its
 output as HTML in a browser, you can use the cgi [1] or fastcgi [2]
 libraries listed on Hackage.

This is the approach that Hoogle takes, and turned out to be very
easy. The code is all available, so you can start from that.

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: some links broken in 6.8.1 documentation

2007-11-12 Thread Daniil Elovkov
Hello Ian

2007/11/10, Ian Lynagh [EMAIL PROTECTED]:

 Hi Daniil,

 On Sun, Nov 04, 2007 at 03:49:54PM +0300, Daniil Elovkov wrote:
 
  A quick look at the 6.8.1 user's guide reveals some broken links:
 
  1)
  Obtaining code coverage, pointing to
  http://haskell.org/ghc/docs/6.8.1/html/users_guide/hpc.html
 
  redirects to http://projects.unsafeperformio.com/hpc.html which tells
  that it's not found but guesses at another location, where it is
  found.

 I can't see any link to http://projects.unsafeperformio.com/hpc.html in
 the users guide - am I missing something?

Oops. I don't know what it was but it's definitely alright now.

  2)
  Concurrent and parallel haskell
  http://haskell.org/ghc/docs/6.8.1/html/users_guide/lang-parallel.html
  (and possibly other pages)
 
  have links to libraries according to the pre-base-split structure,
  like .../base/.. instead of .../parallel/..., which results in those
  links being broken.

 Thanks; I've filed a bug here:
 http://hackage.haskell.org/trac/ghc/ticket/1864

Indeed, version numbers are also in the way.

The easy part of the problem is that pages in the user's guide also
link to base where they should link to new packages emerged from base,
like parallel.

As for version numbers, I'd like to make it more clear to me, what the
split will lead to.

Do I understand it right that the idea of the split was letting all
packages (possibly apart from base) emerge more or less independently
from ghc releases?

So, can package version numbers increase under the same 6.8.1
directory over time?

And, if a package is updated between two ghc releases, will the
extralibs tarball be updated (and precompiled binary ghc packages, for
that matter) ?

-- 
Daniil Elovkov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: some links broken in 6.8.1 documentation

2007-11-12 Thread Bulat Ziganshin
Hello Daniil,

Monday, November 12, 2007, 7:56:23 PM, you wrote:

 And, if a package is updated between two ghc releases, will the
 extralibs tarball be updated (and precompiled binary ghc packages, for
 that matter) ?

i think it will be bad idea. instead, anyone who need to have latest
package, should install 6.8.1 plus any updated libraries


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Why are OCaml and Haskell being used at these companies?

2007-11-12 Thread Galchin Vasili
Hello,

Using http://www.indeed.com with the search phrase Haskell functional,
I found several Haskell positions inclusing

Quantitative Functional Programmer (Analyst -
Level)http://www.indeed.com/rc/clk?jk=950afd03471e43cbfrom=jacd=0B84_stXHsQIi--kqgcAtwkqfEFNHwdDbrS1x6sG6qd6vVd2F9lWGMmpcNKZhUl4vYoq6CxBPHbov0Iq1E7i0I280wysegJY2TsQ1uFW7W_5TT4m0Zj94dTxgyQTopT3S0sT8XXLFkgUNtb7Vnd-g90KjCOBR8L3-j4DDe5C5IWB90L0VOIkMXvl8vqDEnzncPVLYuVLwWSceCP4ZHmZ3460UPeMcjpKVyHhxzB4j1RctniY18yLwC5uX2r9d7cvhgE9HBp5fU9Mwl9IHrzlc5G6Snh7h8t7rIdr7Jgu3cEqd=RnZhMybXSk4M3QtTVGXWoYOKTPFCbzpm8jWESW0p0eMKASM0UIjh16lawXYVmI3Pl-Bs_tBXR8fwdr6b7g8zZmd1JbykUrZLXGO6H03JYDQrd=i9i5wxAjTH4MK5Gz0qo8FA
Credit Suisse - New York, NY
Specific *Language* (embedded in *Haskell*) that will be... of competence in
either *Haskell* or another statically-typed functional *language*. The
ability to build...
From Credit Suisse - November 11, 3:32 PM

I am looking for (objective.. i.e. not juts FPL cheerleading) opinions as to
why Wall Street ( http://www.janestcapital.com/) and banking  are now using
OCaml and Haskell. I really want to understand what industrial markets are
adopting FPLs and why in order to help push FPLs penetration into industry.
Another company is http://www.galois.com
Kind regards, Vasya
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why are OCaml and Haskell being used at these companies?

2007-11-12 Thread Don Stewart
vigalchin:
I am looking for (objective.. i.e. not juts FPL cheerleading) opinions as
to why Wall Street ( [3]http://www.janestcapital.com/) and banking  are
now using OCaml and Haskell. I really want to understand what industrial
markets are adopting FPLs and why in order to help push FPLs penetration
into industry. Another company is [4]http://www.galois.com

Perhaps start at http://cufp.galois.com/.

A quick summary: small differences in productivity show up as real
dollar amounts to banking/wall street types, and faults are less
tolerated than in some industries. Galois, in particular, is in it for
the the high assurance/correctness aspects.

So:
* productivity
* correctness

-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question

2007-11-12 Thread Lennart Augustsson
No worries.
I read the History of Haskell paper twice, but not the final version, I guess.

As far as I remember you started the bootstrapping with the ghc built
on the LML compiler.  But as hbc became available it was soon more
reliable and produced better code, so you switched to that until the
new ghc could compile itself.  That's how I remember it.

There's also a bunch of Prelude related code in the ghc libraries that
originates with hbc.  I've been to lazy to send any bug reports
about this.
(Just to get a line of attribution.)

  -- Lennart


On Nov 12, 2007 9:33 AM, Simon Peyton-Jones [EMAIL PROTECTED] wrote:
 | It's interesting that the article completely fails to mention hbc
 | which I know they used during the GHC bootstrap.  Oh well. :)
 |
 | On Nov 11, 2007 2:41 PM, Richard Kelsall [EMAIL PROTECTED] wrote:
 |  Andrew Coppin wrote:
 |   ...if GHC is written in Haskell, how the heck did they compile GHC in
 |   the first place?

 Lennart, I'm sure this is my fault, and I do apologise.  If we used hbc in 
 the bootstrap, I'd completely forgotten; I thought we'd just used the LML 
 compiler, which is indeed credited.  (Perhaps not everyone knows that you 
 wrote the LML compiler too, with Thomas Johnsson, of course.   It completely 
 changed the landscape of lazy-functional-language compilers.)  What I do 
 remember is that we constantly compared ghc's performance to hbc's, and took 
 ages to catch up!

 I wish we'd corrected any errors of fact before the paper was published.  (It 
 was on the Web for 6 months before publication to accumulate corrections, but 
 errors and omissions remain our fault.)

 Simon


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Interesting effect of upgrading GHC

2007-11-12 Thread Andrew Coppin

Hi guys.

I just removed GHC 6.6.1 and installed 6.8.1, and I noticed something 
rather unexpected. I recompiled an existing program (with -O2), and 
instead of taking 30 seconds to compile, it took roughly 2 seconds. 
That's a really serious speedup! o_O Anybody have any idea what might 
have caused this? (Not, you understand, that I'm complaining! But the 
release notes say 10-15% faster, not 15,000% faster...)


I am also curiose to see whether the compiled code execution speed is 
better/worse - but the program in question is mainly GUI, so I can't 
test it with that... Perhaps my Chaos program? ;-)


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Interesting effect of upgrading GHC

2007-11-12 Thread Neil Mitchell
Hi

 I just removed GHC 6.6.1 and installed 6.8.1, and I noticed something
 rather unexpected. I recompiled an existing program (with -O2), and
 instead of taking 30 seconds to compile, it took roughly 2 seconds.

In previous releases, certain constructs took O(n^2) time to compile.
One that was a particular issue for me was:

do return ()
 return ()
 return ()

Once you got to 100 return ()'s in a row GHC was totally useless,
while Yhc and Hugs both had no problems. This particular problem was
fixed, and I think a few others were as well - if one of those had
tripped you up that may explain the speedup.

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Interesting effect of upgrading GHC

2007-11-12 Thread Roel van Dijk
Not sure if this is the case but if you don't delete the old object
files and executable GHC may think that its job is already done and
give up early.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: How to do this in Haskell

2007-11-12 Thread Joe Buehler
Chris Smith wrote:

 Right, which is why I'm trying to avoid reinventing it.  Writing a new 
 HTML editor is not even a consideration.  I'm looking at the effort to 
 integrate the Mozilla editor component, and wondering if there are other 
 components that could be used instead in a Gtk2Hs application.

A not-so-well-known feature of X11 is reparenting of windows.  You should
be able to take any X11 app and have it display in a window of your choice
inside your app.  So pick an HTML editor and integrate it into your app
that way.

-- 
Joe Buehler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Weird ghci behaviour?

2007-11-12 Thread Dan Piponi
Several months late I now have a simple test case for what I think is
either a GHC bug or a misexpectation on my part. This is with GHC
6.8.1 and I've tested both under Linux and MacOSX. It took a while to
reproduce it because I thought the problem had gone away, but actually
I'd just misunderstood when it happens. Here's a transcript of a
complete session with a shell to make it easy to reproduce. Note how
on the second run, ghci behaves differently.

--

 cat  bug.hs
x = 1

main = do
print x
 ghci bug.hs
GHCi, version 6.8.1: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
[1 of 1] Compiling Main ( bug.hs, interpreted )
Ok, modules loaded: Main.
*Main main
1
*Main x
1
*Main :q
Leaving GHCi.
 ghc bug.hs
 ghci bug.hs
GHCi, version 6.8.1: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Ok, modules loaded: Main.
Prelude Main main
1
Prelude Main x

interactive:1:0: Not in scope: `x'
Prelude Main Leaving GHCi.

---

On Jul 23, 2007 10:46 AM, Dan Piponi [EMAIL PROTECTED] wrote:
 Ian said:

  Can you please give a complete testcase for the problem you're seeing?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Weird ghci behaviour?

2007-11-12 Thread Chris Smith
Dan Piponi wrote:
 Several months late I now have a simple test case for what I think is
 either a GHC bug or a misexpectation on my part.

Here's what it looks like to me.

If there is a .hi and .o file sitting around for a module, then GHCi 
will load it in compiled mode, and only let you access those symbols 
that are exported by the .hi file.  If you compile a source file that 
has no module header, it compiles to the module Main and *only* exports 
the symbol main.  You can fix it by adding a module header explicitly, 
or by deleting either the .hi or .o file.

This is not new with GHC 6.8.  For example, it's why I had to sneakily 
add a module declaration to the top of a source file when I wrote
 http://www.haskell.org/haskellwiki/Learn_Haskell_in_10_minutes#Function_definitions

-- 
Chris Smith

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Interesting effect of upgrading GHC

2007-11-12 Thread Andrew Coppin

Gwern Branwen wrote:

FWIW, I was actually discussing compilation with -O2 on 6.8 with Sjannssen and 
he told me that even with -O2 turned on, GHC now defaults to -fasm instead of 
-fvia-c.


Ah. Yeah, that could well make a big difference... (Especially on a 
machine with insufficient RAM.)



Also, the release notes are talking about the runtime speed of binaries, not 
compilation.
  


But since GHC is compiled with GHC, you would expect a (small) speedup 
of GHC. (And indeed that is what the release notes specifically suggest.)


Either way, I (and probably a number of other people) will go test what 
speed difference it actually makes to compiled code. ;-) (I've been 
wondering for a while now whether there's much to choose between -fasm 
and -fvia-c.)


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-12 Thread Henning Thielemann

On Mon, 12 Nov 2007, Chris Smith wrote:

 Dan Piponi wrote:
  Several months late I now have a simple test case for what I think is
  either a GHC bug or a misexpectation on my part.

 Here's what it looks like to me.

 If there is a .hi and .o file sitting around for a module, then GHCi
 will load it in compiled mode, and only let you access those symbols
 that are exported by the .hi file.  If you compile a source file that
 has no module header, it compiles to the module Main and *only* exports
 the symbol main.  You can fix it by adding a module header explicitly,
 or by deleting either the .hi or .o file.

See
  
http://www.haskell.org/ghc/docs/latest/html/users_guide/interactive-evaluation.html

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Data.Set.member vs Data.List.elem

2007-11-12 Thread Neil Mitchell
Hi,

Is there a good reason that Data.Set uses the name member while
Data.List (or the Prelude) uses the name elem, for what to me seem
identical concepts. I realise that in Set's the traditional test is
for membership, but it seems awfully arbitrary that one jumped one
way and one jumped the other. I've just written an entire module's
worth of Haskell with Set.elem, as that felt right, now I'm going
back and fixing it.

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-12 Thread Dan Piponi
On Nov 12, 2007 1:59 PM, Henning Thielemann
[EMAIL PROTECTED] wrote:
 See
   
 http://www.haskell.org/ghc/docs/latest/html/users_guide/interactive-evaluation.html

I guess the key sentence is:

For technical reasons, GHCi can only support the *-form for modules
which are interpreted, so compiled modules and package modules can
only contribute their exports to the current scope. But it does mean
the interpreter isn't referentially transparent, which is weird for a
language that puts so much stress on referential transparency.
--
Dan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Trouble using HDBC-postgres on Windows - can't find libpq.dll

2007-11-12 Thread Justin Bailey
I've compiled HDBC 1.0.1 and HDBC-postgresql-1.0.1 under Windows with
a little tweaking. However, when I try to run the tests I get this
error:

  runghc -package HDBC-postgresql  runtests.hs
  ghc.exe: can't load .so/.DLL for: pq (addDLL: unknown error)

libpq.dll is in my path, and I added the correct paths to the .cabal
file when I built it. Does anyone have an idea what might be the
problem?

Justin

p.s. I have postgres 8.2 installed if that matters.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: How to do this in Haskell

2007-11-12 Thread Duncan Coutts
On Mon, 2007-11-12 at 16:16 -0500, Joe Buehler wrote:
 Chris Smith wrote:
 
  Right, which is why I'm trying to avoid reinventing it.  Writing a new 
  HTML editor is not even a consideration.  I'm looking at the effort to 
  integrate the Mozilla editor component, and wondering if there are other 
  components that could be used instead in a Gtk2Hs application.
 
 A not-so-well-known feature of X11 is reparenting of windows.  You should
 be able to take any X11 app and have it display in a window of your choice
 inside your app.  So pick an HTML editor and integrate it into your app
 that way.

Ah yes, that's a good point. Gtk+ and Gtk2hs support this X11 feature:
http://haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-Embedding-Plug.html
http://haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-Embedding-Socket.html

Duncan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Data.Set.member vs Data.List.elem

2007-11-12 Thread Ryan Dickie
Perhaps this has something to due with uniqueness. A list can have many
duplicate elements while a set is supposed to be unique.

On Nov 12, 2007 2:48 PM, Neil Mitchell [EMAIL PROTECTED] wrote:

 Hi,

 Is there a good reason that Data.Set uses the name member while
 Data.List (or the Prelude) uses the name elem, for what to me seem
 identical concepts. I realise that in Set's the traditional test is
 for membership, but it seems awfully arbitrary that one jumped one
 way and one jumped the other. I've just written an entire module's
 worth of Haskell with Set.elem, as that felt right, now I'm going
 back and fixing it.

 Thanks

 Neil
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why are OCaml and Haskell being used at these companies?

2007-11-12 Thread Donn Cave

On Nov 12, 2007, at 12:00 PM, Galchin Vasili wrote:
I am looking for (objective.. i.e. not juts FPL cheerleading)  
opinions as to why Wall Street ( http://www.janestcapital.com/) and  
banking  are now using OCaml and Haskell. I really want to  
understand what industrial markets are adopting FPLs and why in  
order to help push FPLs penetration into industry.
I wouldn't know about that, but incidentally, the first I heard of a  
distinct Wall Street
software world, in the 90's, they were looking for Smalltalk  
programmers.  Who knows

what those crazy guys will be doing next.

Donn Cave, [EMAIL PROTECTED]


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] can someone explain monad transformers to me, or how do you combine maybe and IO?

2007-11-12 Thread Anatoly Yakovenko
I wanted something that would work like liftM but with IO as well, so
something like this:

 liftM ((+) 1) $ Just 1
Just 2

but with the function lifted being of type (a - IO b).  so I came up with

maybeIO::(a - IO b) - (Maybe a - IO (Maybe b))
maybeIO ff = (\ aa -
   case aa of
  Nothing - return $ Nothing
  Just vv - do
 rv - ff vv
 return $ Just rv)

incIO:: Int - IO Int
incIO ii = return $ ii + 1


 maybeIO incIO $ Just 1
Just 2

works just like I want it to.  But isn't this something that a monad
transformer should be able to do?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-12 Thread Claus Reinke

For technical reasons, GHCi can only support the *-form for modules
which are interpreted, so compiled modules and package modules can
only contribute their exports to the current scope. But it does mean
the interpreter isn't referentially transparent, which is weird for a
language that puts so much stress on referential transparency.


iirc, you can use -fforce-recomp with GHCi, to make it look
for sources, ignoring compiled code, if that is what you want:

http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#recomp

claus


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] can someone explain monad transformers to me, or how do you combine maybe and IO?

2007-11-12 Thread Luke Palmer
On Nov 12, 2007 11:59 PM, Anatoly Yakovenko [EMAIL PROTECTED] wrote:
 works just like I want it to.  But isn't this something that a monad
 transformer should be able to do?

Yes.  And I have rewritten MaybeT several times for use in my own projects.

We want MaybeT!

Luke
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why are OCaml and Haskell being used at these companies?

2007-11-12 Thread Derek Elkins
On Mon, 2007-11-12 at 15:51 -0800, Donn Cave wrote:
 On Nov 12, 2007, at 12:00 PM, Galchin Vasili wrote:
  I am looking for (objective.. i.e. not juts FPL cheerleading)  
  opinions as to why Wall Street ( http://www.janestcapital.com/) and  
  banking  are now using OCaml and Haskell. I really want to  
  understand what industrial markets are adopting FPLs and why in  
  order to help push FPLs penetration into industry.
 I wouldn't know about that, but incidentally, the first I heard of a  
 distinct Wall Street
 software world, in the 90's, they were looking for Smalltalk  
 programmers.  Who knows
 what those crazy guys will be doing next.

Epigram?

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] can someone explain monad transformers to me, or how do you combine maybe and IO?

2007-11-12 Thread Alfonso Acosta
On Nov 13, 2007 1:08 AM, Luke Palmer [EMAIL PROTECTED] wrote:
 We want MaybeT!

I third this proposal. It would be nice having MaybeT included in mtl.

Besides, and although it's not exactly the same, you can emulate the
Maybe monad by using the Either monad (the instance is defined in
Control.Monad.Error).

And in this case you want a monad transformer,  so ErrorT can do the trick.

Just consider that all the Left values are Nothing and the Right
values are Just.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Fwd: Trouble using HDBC-postgres on Windows - can't find libpq.dll

2007-11-12 Thread Justin Bailey
Well, I answered my own question. Unlike UNIX, specifying a library
without the leading lib causes the library to not be found. Not sure
if that's a GHC linking problem or what. Changing the library
requirement to libpq in the .cabal file did the trick tho.

Justin


-- Forwarded message --
From: Justin Bailey [EMAIL PROTECTED]
Date: Nov 12, 2007 3:41 PM
Subject: Trouble using HDBC-postgres on Windows - can't find libpq.dll
To: Haskell Cafe haskell-cafe@haskell.org


I've compiled HDBC 1.0.1 and HDBC-postgresql-1.0.1 under Windows with
a little tweaking. However, when I try to run the tests I get this
error:

  runghc -package HDBC-postgresql  runtests.hs
  ghc.exe: can't load .so/.DLL for: pq (addDLL: unknown error)

libpq.dll is in my path, and I added the correct paths to the .cabal
file when I built it. Does anyone have an idea what might be the
problem?

Justin

p.s. I have postgres 8.2 installed if that matters.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why are OCaml and Haskell being used at these companies?

2007-11-12 Thread Jon Harrop
On Monday 12 November 2007 20:00, Galchin Vasili wrote:
 I am looking for (objective.. i.e. not juts FPL cheerleading) opinions as
 to why Wall Street ( http://www.janestcapital.com/) and banking  are now
 using OCaml and Haskell.

They have been using OCaml and Haskell for many years now. They were among the 
first industrial adopters of modern statically-typed functional programming 
languages along with companies like Intel and Microsoft who use them to write 
verification software.

 I really want to understand what industrial 
 markets are adopting FPLs and why in order to help push FPLs penetration
 into industry. Another company is http://www.galois.com
 Kind regards, Vasya

For the old examples that you gave, reliability was a major concern.

Functional programming languages are now much more widely used in industry, 
primarily because they offer substantial productivity improvements (roughly 
10x) over C++ and Java and, consequently, are much more cost effective.

Penetration is highest in parts of industry where small groups of talented 
programmers get together, most notably startups. Look at XenSource, Wolfram 
Research, The MathWorks, Wink, Merjis, Red Hat, Linspire and Skydeck for 
example.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe