[Haskell-cafe] Intermediate Haskell Books?

2007-05-06 Thread Adrian Neumann
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Are there any good books about intermediate to advanced Haskell? The
descriptions here http://haskell.org/haskellwiki/Books_and_tutorials
aren't very helpful.

Adrian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGPZCo11V8mqIQMRsRA8nVAJ9fs4c013qKOuEjX//uLW3hLTYtxACfTS/t
5D6I+/OGifs3ltYhx6rwFZA=
=sNJP
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Intermediate Haskell Books?

2007-05-06 Thread Donald Bruce Stewart
aneumann:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: RIPEMD160
 
 Are there any good books about intermediate to advanced Haskell? The
 descriptions here http://haskell.org/haskellwiki/Books_and_tutorials
 aren't very helpful.

Not in real-world paper form, yet.

Mostly advanced techniques and tools are documented in research papers
(see the wiki), wiki articles and blog articles.

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


Re: [Haskell-cafe] Re: (Chaos) [An interesting toy]

2007-05-06 Thread Andrew Coppin

[EMAIL PROTECTED] wrote:

I appreciated the elegance of
overloading, the usage of Num classes, etc, which makes it more readable,
although somewhat slower.


The source code has explicit monomorphic types all over it; I would 
expect GHC to be able to optimise out any method calls. (OTOH, I'm not a 
GHC expert... Simon? Don?)



For those who don't have patience to execute the program, I converted the
ppms to a XVID coded AVI file. Thanks, Andrew
http://users.info.unicaen.fr/~karczma/Work/Chaos0.avi


Thanks for that. I did try encoding the video as MPEG 1, but it was 
still far too large. (20 MB.) Would have taken me several months to 
upload...



What I didn't appreciate was the use of simple extrapolating Euler's
method which for oscillating systems is known to be unstable, so the 
results

of the simulation may be far from the reality. Well, one chaos is worth
another one, and the sin is not as mortal as in the case of truly 
periodic
systems, but it may be the cause that it is difficult to see the 
classical

fractal structure of the attraction domains on the generated images.


Fact #1: I don't *know* of any other numerical integration algorithm. 
(I've heard of RK4, but it's too complicated for me to understand.)
Fact #2: I have tried running the simulation with several different, 
non-comensurate time step values, and it always seems to produce the 
same output, so I'm reasonably confident there are no integration errors.


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


Re: [Haskell-cafe] Intermediate Haskell Books?

2007-05-06 Thread David House

On 06/05/07, Adrian Neumann [EMAIL PROTECTED] wrote:

Are there any good books about intermediate to advanced Haskell? The
descriptions here http://haskell.org/haskellwiki/Books_and_tutorials
aren't very helpful.


One of the aims of the Haskell wikibook [1] is to provide a good
coverage of the more advanced topics interesting to a Haskell
programmer. A lot of the sections are incomplete as yet, but there's
still quite a lot of good stuff there. We'd appreciate very much any
feedback you have: a good place to send this is the wikibook mailing
list [2].

If you're reading this as a competent Haskell programmer, why not
spend an hour or so improving one of the advanced sections? If there's
something you want to write about but that isn't a current chapter,
just start it anyway and we'll include it in.

[1]: http://en.wikibooks.org/wiki/Haskell
[2]: [EMAIL PROTECTED]

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


[Haskell-cafe] Silly mail client

2007-05-06 Thread Andrew Coppin
OK, this is hacking me off now... Does ANYBODY know how I can convince 
Thunderbird to send replies to Haskell Cafe rather than sending them to 
the original poster? This is really becoming tiresome...


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


Re: [Haskell-cafe] Silly mail client

2007-05-06 Thread David House

On 06/05/07, Andrew Coppin [EMAIL PROTECTED] wrote:

OK, this is hacking me off now... Does ANYBODY know how I can convince
Thunderbird to send replies to Haskell Cafe rather than sending them to
the original poster? This is really becoming tiresome...


Is there a 'Reply to All' option? That's what it's called in Gmail,
you just have to remember to click that instead of the vanilla
'Reply'.

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


Re: [Haskell-cafe] [IO Int] - IO [Int]

2007-05-06 Thread Magnus Therning
On Fri, May 04, 2007 at 19:23:16 +0200, Phlex wrote:
Hello all,

I'm trying to learn haskell, so here's is my first newbie question.
I hope this list is appropriate for such help requests.

I'm trying to write a function with the signature [IO Int] - IO [Int]

Here is my first attempt :

conv :: [IO Int] - IO [Int]
conv l = do val - (head l)
   return (val : (conv (tail l)))

This does not work as I'm consing an Int to an (IO [Int]).
So I tried this :

conv2 :: [IO Int] - IO [Int]
conv2 l = do val - (head l)
rest - (conv2 (tail l))
return (val : rest)

That works, but it won't work for infinite lists.
How could I achieve the desired result ?

I had a similar problem a little while back.  I also asked on this list
and maybe that discussion[1] can illuminate the issue.  I also put an
entry on my blog afterwards in an attempt to capture my understanding of
it all[2].

/M

[1]: http://www.haskell.org/pipermail/haskell-cafe/2007-January/021367.html
[2]: http://therning.org/magnus/archives/249

-- 
Magnus Therning (OpenPGP: 0xAB4DFBA4)
[EMAIL PROTECTED] Jabber: [EMAIL PROTECTED]
http://therning.org/magnus


pgpWXpCLxe8LB.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] GADTs, type classes, existentials

2007-05-06 Thread Mike Hamburg
Hello all,

I'm trying to build a variation on Maps which supports a fast
concat-like operation, for a library I'm writing.  I'd rather not
re-implement Data.Map, so I'm having a try with GADTs.

The relevant part of my source file:

-
data MetaMap k v where
Map  :: Ord k = Map.Map k v - MetaMap k v
Cat  :: MetaMap k1 (MetaMap k2  v) - MetaMap (k1,k2) v
{- other, similar constructors -}

lookup :: Monad m = k - MetaMap k v - m v
lookup k (Map  m) = Map.lookup k m
lookup k (Cat  m) = case k of (k1,k2) - lookup k1 m = lookup k2
-

Unfortunately, this doesn't work:

Data/MetaMap.hs:45:20:
Could not deduce (Ord k) from the context (Monad m)
  arising from use of `Map.lookup' at Data/MetaMap.hs:45:20-33
Possible fix: add (Ord k) to the type signature(s) for `lookup'
In the expression: Map.lookup k m
In the definition of `lookup': lookup k (Map m) = Map.lookup k m

This error happens because the Ord constraint isn't propagated into the
function body.  Of course, I can't add Ord k to the type signature for
lookup, because one can't deduce Ord k from Ord (k1,k2).

Is there a clean way around this error?

Thanks for your time,
Mike Hamburg

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


Re: [Haskell-cafe] Silly mail client

2007-05-06 Thread ls-haskell-developer-2006

Andrew Coppin [EMAIL PROTECTED] writes:

 OK, this is hacking me off now... Does ANYBODY know how I can convince
 Thunderbird to send replies to Haskell Cafe rather than sending them
 to the original poster? This is really becoming tiresome...

My best approach to that has been to explicitely rewrite the Reply-To
with procmail when the mail arrives at my place. The problem is, that
the 'List-Id' tag will only work, if all clients stick to the implied
rules (which they don't) and if you don't have a MTA or mailbox
storage (like cyrus) which eliminates duplicates (then answers copied
to you arrive earlier, leading to elimination of the copy with the
List-Id tag). After long and careful study I've come to the conclusion
that every magic based on headers inserted by the mailing list and
based on all participants mail clients sticking to some rules won't
work.

Originally, as I understand it, the Mail-Followup-To field had been
intended to indicate an address for reply to list. But most mail
clients don't support it. I'm not sure wether Thunderbird supports it,
but I've heard a reply all would reply to the address indicated in
Mail-Followup-To. The problem is anyway (a) Haskell Cafe does not
provide the field and (b) duplicate elimination would quite possibly
kick the wrong mail copy (that which has Mail-Followup-To set). 

So my suggestion:

 1) Use procmail
 2) Detect haskell-cafe in the headers
 3) Add the List-Id and Mail-Followup-To at you side.

 4) If you have client which doesn't respect Mail-Followup-To (try
reply all), then also add a Reply-To header.

(4) means, if you wan't to reply by mail to the individual author,
you'll have to edit the receiver address by hand.

Regards -- Markus

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


Re: [Haskell-cafe] Chaos

2007-05-06 Thread Andrew Coppin
Just so people know... The version in Darcs now has strict Colour and 
Vector constructors. (Makes it run a few percent faster.)


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


Re: [Haskell-cafe] Silly mail client

2007-05-06 Thread Chris Eidhof
One thing I did was replacing the Reply button in my toolbar with  
Reply All. The only problem is that I always use Cmd+R instead of  
clicking a button, but I'm at least a little bit closer.


-chris

On 6-mei-2007, at 15:21, [EMAIL PROTECTED] wrote:



Andrew Coppin [EMAIL PROTECTED] writes:

OK, this is hacking me off now... Does ANYBODY know how I can  
convince

Thunderbird to send replies to Haskell Cafe rather than sending them
to the original poster? This is really becoming tiresome...


My best approach to that has been to explicitely rewrite the Reply-To
with procmail when the mail arrives at my place. The problem is, that
the 'List-Id' tag will only work, if all clients stick to the implied
rules (which they don't) and if you don't have a MTA or mailbox
storage (like cyrus) which eliminates duplicates (then answers copied
to you arrive earlier, leading to elimination of the copy with the
List-Id tag). After long and careful study I've come to the conclusion
that every magic based on headers inserted by the mailing list and
based on all participants mail clients sticking to some rules won't
work.

Originally, as I understand it, the Mail-Followup-To field had been
intended to indicate an address for reply to list. But most mail
clients don't support it. I'm not sure wether Thunderbird supports it,
but I've heard a reply all would reply to the address indicated in
Mail-Followup-To. The problem is anyway (a) Haskell Cafe does not
provide the field and (b) duplicate elimination would quite possibly
kick the wrong mail copy (that which has Mail-Followup-To set).

So my suggestion:

 1) Use procmail
 2) Detect haskell-cafe in the headers
 3) Add the List-Id and Mail-Followup-To at you side.

 4) If you have client which doesn't respect Mail-Followup-To (try
reply all), then also add a Reply-To header.

(4) means, if you wan't to reply by mail to the individual author,
you'll have to edit the receiver address by hand.

Regards -- Markus

___
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] Silly mail client

2007-05-06 Thread David Brown
Chris Eidhof wrote:

 One thing I did was replacing the Reply button in my toolbar with
 Reply All. The only problem is that I always use Cmd+R instead of
 clicking a button, but I'm at least a little bit closer.

Try shifting the 'R'.  Cmd+Shift+R for Mac users, or Control+Shift+R
for others should reply all.  At least that what I just did :-)

Dave

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


Re: [Haskell-cafe] Silly mail client

2007-05-06 Thread ls-haskell-developer-2006

Chris Eidhof [EMAIL PROTECTED] writes:

 One thing I did was replacing the Reply button in my toolbar with
 Reply All. The only problem is that I always use Cmd+R instead of
 clicking a button, but I'm at least a little bit closer.

(and: No top posting please.)

Yes, I just found, that haskell-cafe provides the List-Post field,
which is more and more supported by various clients and according to
RFC.

Nonethelesse, in the presence of duplicate eleminating mail transports
or storage systems the direct copy arrives first and the later copy
(carrying the required header fields) is eleminated. Of course you
only see that if somebody is replying to you mail with a client that
doesn't send to the list only on reply all or rplay list -- as
yours did.

There is -- AFAIS -- no way around procmail magic (or one has to turn
off all duplicate elimination, but sometimes that is not in your
power).

Everyone interested in the topic should also read 

   http://woozle.org/~neale/papers/reply-to-still-harmful.html

Note that I don't suggest reply-to munging by the list: It's has to
everyones individual choice if he/she works with a broken
(i.e. restricted) mail client that doesn't support the list header
fields.

Regards -- Markus


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


Re: [Haskell-cafe] GADTs, type classes, existentials

2007-05-06 Thread Stefan O'Rear
On Sun, May 06, 2007 at 03:11:12AM -0700, Mike Hamburg wrote:
 Hello all,
 
 I'm trying to build a variation on Maps which supports a fast
 concat-like operation, for a library I'm writing.  I'd rather not
 re-implement Data.Map, so I'm having a try with GADTs.
 
 The relevant part of my source file:
 
 -
 data MetaMap k v where
 Map  :: Ord k = Map.Map k v - MetaMap k v
 Cat  :: MetaMap k1 (MetaMap k2  v) - MetaMap (k1,k2) v
 {- other, similar constructors -}
 
 lookup :: Monad m = k - MetaMap k v - m v
 lookup k (Map  m) = Map.lookup k m
 lookup k (Cat  m) = case k of (k1,k2) - lookup k1 m = lookup k2
 -
 
 Unfortunately, this doesn't work:
 
 Data/MetaMap.hs:45:20:
 Could not deduce (Ord k) from the context (Monad m)
   arising from use of `Map.lookup' at Data/MetaMap.hs:45:20-33
 Possible fix: add (Ord k) to the type signature(s) for `lookup'
 In the expression: Map.lookup k m
 In the definition of `lookup': lookup k (Map m) = Map.lookup k m
 
 This error happens because the Ord constraint isn't propagated into the
 function body.  Of course, I can't add Ord k to the type signature for
 lookup, because one can't deduce Ord k from Ord (k1,k2).
 
 Is there a clean way around this error?

Yes, upgrade.

Type classes and GADTs are broken in all versions prior to HEAD (at
which point Simon made a heroic effort to do something I don't quite
understand to the type checker). 

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


RE: [Haskell-cafe] Any Haskellers in St Louis, MO?

2007-05-06 Thread Green Bryan - bgreen
Anyone out there from the Little Rock, AR area?  I am located in Conway
and we are using Haskell where I work.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aditya Siram
Sent: Saturday, May 05, 2007 8:13 PM
To: Haskell-Cafe@haskell.org
Subject: [Haskell-cafe] Any Haskellers in St Louis, MO?

Hi there..
Are there any Haskellers in St Louis , MO? Is there an active group
here? 
Want to start one?

Thanks...
Deech

_
Exercise your brain! Try Flexicon. 
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_hmemailtaglin
eapril07

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
***
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.

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


[Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Andrew Coppin

Greetings.

Haskell has arbitrary precision integers, in the form of the Integer 
type. Is there a type somewhere that implements arbitrary precision 
fractional values?


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


Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Stefan O'Rear
On Sun, May 06, 2007 at 05:15:08PM +0100, Andrew Coppin wrote:
 Greetings.
 
 Haskell has arbitrary precision integers, in the form of the Integer 
 type. Is there a type somewhere that implements arbitrary precision 
 fractional values?

Yes, Rational in the Prelude (with extra functions in Ratio)

Prelude let fibs = (1::Rational) : 1 : zipWith (+) fibs (tail fibs)
Prelude let grs = zipWith (/) (tail fibs) fibs
Prelude take 10 grs
[1%1,2%1,3%2,5%3,8%5,13%8,21%13,34%21,55%34,89%55]
Prelude take 10 (zipWith (-) grs (tail grs))
[(-1)%1,1%2,(-1)%6,1%15,(-1)%40,1%104,(-1)%273,1%714,(-1)%1870,1%4895]
Prelude
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Topoi, the categorical Analysis of Logic

2007-05-06 Thread Philippe de Rochambeau

Hello,

has anybody on this list read Goldblatt's Topoi, the categorical  
Analysis of Logic? Did reading that book make you a better Haskell  
programmer? If so, how?


Cheers,

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


Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Andrew Coppin



Greetings.

Haskell has arbitrary precision integers, in the form of the Integer 
type. Is there a type somewhere that implements arbitrary precision 
fractional values?



Yes, Rational in the Prelude (with extra functions in Ratio)

Prelude let fibs = (1::Rational) : 1 : zipWith (+) fibs (tail fibs)
Prelude let grs = zipWith (/) (tail fibs) fibs
Prelude take 10 grs
[1%1,2%1,3%2,5%3,8%5,13%8,21%13,34%21,55%34,89%55]
Prelude take 10 (zipWith (-) grs (tail grs))
[(-1)%1,1%2,(-1)%6,1%15,(-1)%40,1%104,(-1)%273,1%714,(-1)%1870,1%4895]
Prelude
  


Ah yes, you're right. Well, you learn something every day...

OOC, is there a reason why you can't just write 5%10?

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


Re: [Haskell-cafe] Topoi, the categorical Analysis of Logic

2007-05-06 Thread Creighton Hogg

Hi,
I've been reading it off and on for a couple of months.  I definitely
wouldn't say it'll make you a better programmer, but it's a pretty nice,
gentle, introduction to some basic category theory and some uses of topoi.
Read it if you're interested in all that, not if you're just focused on
programming.

On 5/6/07, Philippe de Rochambeau [EMAIL PROTECTED] wrote:


Hello,

has anybody on this list read Goldblatt's Topoi, the categorical
Analysis of Logic? Did reading that book make you a better Haskell
programmer? If so, how?

Cheers,

phiroc
___
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] Arbitrary precision?

2007-05-06 Thread Brandon S. Allbery KF8NH


On May 6, 2007, at 12:59 , Andrew Coppin wrote:

OOC, is there a reason why you can't just write 5%10?


Prelude :t 5%10

interactive:1:1: Not in scope: `%'
Prelude :m +Data.Ratio
Prelude Data.Ratio :t 5%10
5%10 :: (Integral t) = Ratio t
Prelude Data.Ratio

I'm actually a bit surprised that's not in Prelude.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon universityKF8NH


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


Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Andrew Coppin

Brandon S. Allbery KF8NH wrote:

OOC, is there a reason why you can't just write 5%10?


Prelude :t 5%10

interactive:1:1: Not in scope: `%'
Prelude :m +Data.Ratio
Prelude Data.Ratio :t 5%10
5%10 :: (Integral t) = Ratio t
Prelude Data.Ratio

I'm actually a bit surprised that's not in Prelude.


Likewise...

Oh, by the way, thanks for the extra syntax. It's really annoying having 
to locate Notepad.exe on the start menu, type import Blah, save it as 
Thing.hs, open Windoze Explorer, locate Thing.hs, and then 
double-click it just so that I can try stuff out in GHCi...


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


Re: [Haskell-cafe] GADTs, type classes, existentials

2007-05-06 Thread Mike Hamburg
On Sun, 2007-05-06 at 07:10 -0700, Stefan O'Rear wrote:
 On Sun, May 06, 2007 at 03:11:12AM -0700, Mike Hamburg wrote:
  Is there a clean way around this error?
 
 Yes, upgrade.
 
 Type classes and GADTs are broken in all versions prior to HEAD (at
 which point Simon made a heroic effort to do something I don't quite
 understand to the type checker). 
 
 Stefan

Ah.  Well, thanks for your time, and props to Simon!

Mike

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


Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Jim Burton



Andrew Coppin wrote:
 
 ...
 
 Likewise...
 
 Oh, by the way, thanks for the extra syntax. It's really annoying having 
 to locate Notepad.exe on the start menu, type import Blah, save it as 
 Thing.hs, open Windoze Explorer, locate Thing.hs, and then 
 double-click it just so that I can try stuff out in GHCi...
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 

God that sounds painful. As well as reading about ghci [1] you might
consider Emacs and haskell-mode for a productive environment.  

[1] http://www.haskell.org/ghc/docs/6.4.2/html/users_guide/ghci.html

-- 
View this message in context: 
http://www.nabble.com/Arbitrary-precision--tf3700066.html#a10348633
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] c2hs errors when compiling hsGnuTls

2007-05-06 Thread Duncan Coutts
On Sat, 2007-05-05 at 17:18 +0100, David House wrote:
 Hey there,
 
 I'm getting the following errors when I try to compile hsGnuTls [1]:
 
 ~/hs/sandbox/hsgnutls $ c2hs --version
 C-Haskell Compiler, version 0.14.5 Travelling Lightly, 12 Dec 2005
   build platform is i486-pc-linux-gnu 1, True, True, 1
 ~/hs/sandbox/hsgnutls $ runhaskell Setup.lhs build
 Setup.lhs: Warning: The field hs-source-dir is deprecated, please
 use hs-source-dirs.
 Preprocessing library hsgnutls-0.2.3...
 c2hs: Error in C header file.
 
 /usr/include/bits/pthreadtypes.h:69: (column 6) [FATAL]
Syntax error!
   The symbol `;' does not fit here.
 
 Setup.lhs: got error code while preprocessing: Network.GnuTLS.GnuTLS
 
 c2hs version:
 
 I've attached the file it references in case that's relevant. Any tips
 on how I might address this?

Try the latest darcs version of c2hs, it has a new C parser which should
fix issues like this. We should have a new tarball release soon.

Duncan

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


Re: [Haskell-cafe] Playing with GHC [was Arbitrary precision?]

2007-05-06 Thread Andrew Coppin


Oh, by the way, thanks for the extra syntax. It's really annoying having 
to locate Notepad.exe on the start menu, type import Blah, save it as 
Thing.hs, open Windoze Explorer, locate Thing.hs, and then 
double-click it just so that I can try stuff out in GHCi...

God that sounds painful. As well as reading about ghci [1] you might
consider Emacs and haskell-mode for a productive environment.  
  


I started out using Hugs. (The 2003 edition.) I used it for ages, and it 
worked pretty well.


However, later they released a new version. So I downloaded and 
installed that. On one hand, it has a cool updated GUI. On the other 
hand, it behaves very erratically. Truncates output, produces spurios 
extra output, sometimes randomly closes all by itself, and every now and 
then Dr Watson pays me a visit.


Eventually I took the plunge and spent 6 weeks downloading GHC. 
(Basically because I wanted to be able to compile stuff to make it go 
faster.) GHCi is drastically less inviting then Hugs; hell, the window 
isn't even scrollable! (Also, is there a reason why the installer 
doesn't add GHC to your searchpath?) Starting GHCi and typing an 8-mile 
long file path with no tab completion isn't fun. However, after about 2 
months, I discovered that double-clicking a Haskell file instantly loads 
it into GHCi - which is obviously much easier. It's still annoying 
having to write import Data.List, save it, and double-click it just so 
I can (say) look up the type for sortBy. (At home I just use Hoogle, but 
at work that takes too long.)


Eventually I got used to using GHC, and used Hugs less and less due to 
its flakiness, and the fact that half the libraries in the world only 
work with GHC. (The other half don't work with any system at all.) In 
fact, the other day I decided to install Hugs completely. Special 
surprise: the uninstaller is broken. You cannot uninstall Hugs. Oh, 
thanks for that...


Anyway... long ramble over... Emacs isn't my operating system of choice. 
I prefer to use SciTE (which is *just* a text editor - as in, it doesn't 
also come with an integrated toaster and alarm clock). One SciTE window 
open, one command prompt pointing at the source folder... seems to work 
fairly well. Would be nice if SciTE would colourise Haskell syntax, but 
since Haskell is so absurdly hard to parse, I guess that's asking a lot. ;-)


PS. What the heck email client puts URLs in as footnotes?

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


Re: [Haskell-cafe] Playing with GHC [was Arbitrary precision?]

2007-05-06 Thread Stefan O'Rear
On Sun, May 06, 2007 at 10:02:55PM +0100, Andrew Coppin wrote:
 Anyway... long ramble over... Emacs isn't my operating system of choice. 
 I prefer to use SciTE (which is *just* a text editor - as in, it doesn't 
 also come with an integrated toaster and alarm clock). One SciTE window 
 open, one command prompt pointing at the source folder... seems to work 

How about a ghci prompt? You can reload using colon ret

 fairly well. Would be nice if SciTE would colourise Haskell syntax, but 
 since Haskell is so absurdly hard to parse, I guess that's asking a lot. ;-)

Indeed, it has never been done.  I'm not entirely convinced it's
decidable.  But that hasn't stopped anybody from writing parsers for
the commonly used subset of haskell!  Also, highlighting normally does
not require a full parser, just a lexer (which is easy).  (Beschers'
experimental Emacs mode actually highlights type errors...)

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


Re: [Haskell-cafe] Playing with GHC [was Arbitrary precision?]

2007-05-06 Thread Jim Burton



Andrew Coppin wrote:
 
 [...]
 Anyway... long ramble over... Emacs isn't my operating system of choice. 
 I prefer to use SciTE (which is *just* a text editor - as in, it doesn't 
 also come with an integrated toaster and alarm clock). One SciTE window 
 open, one command prompt pointing at the source folder... seems to work 
 fairly well. Would be nice if SciTE would colourise Haskell syntax, but 
 since Haskell is so absurdly hard to parse, I guess that's asking a lot.
 ;-)
 
 

Obviously you should stick with it if you're happy with it but It still
sounds pretty painful to me...using haskell-mode you have highlighted code
in one frame, ghci in another, resting the point over a function call
displays the type, the Declarations menu allows you to jump to a
function/datatype whatever, type C-L to execute the code in another frame
etc -- I'd say it was worth a look unless emacs brings you out in a rash.



 PS. What the heck email client puts URLs in as footnotes?
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 

-- 
View this message in context: 
http://www.nabble.com/Arbitrary-precision--tf3700066.html#a10349446
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] Intermediate Haskell Books?

2007-05-06 Thread Jim Burton



Adrian Neumann wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: RIPEMD160
 
 Are there any good books about intermediate to advanced Haskell? The
 descriptions here http://haskell.org/haskellwiki/Books_and_tutorials
 aren't very helpful.
 
 Adrian
 
 

I think The Fun of Programming fits that description. I don't suppose you'd
call it advanced (for that first decide which parts of the leading edge
you're interested in and see the resources referred to by others, esp.
reading recent papers) but it is a step or two on from the introductory
books and includes some really interesting code and ideas. 

-- 
View this message in context: 
http://www.nabble.com/Intermediate-Haskell-Books--tf3698891.html#a10349551
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread David House

On 06/05/07, Andrew Coppin [EMAIL PROTECTED] wrote:

Oh, by the way, thanks for the extra syntax. It's really annoying having
to locate Notepad.exe on the start menu, type import Blah, save it as
Thing.hs, open Windoze Explorer, locate Thing.hs, and then
double-click it just so that I can try stuff out in GHCi...


Any reason you can't use :module Blah in GHCi?

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


Re: [Haskell-cafe] Playing with GHC [was Arbitrary precision?]

2007-05-06 Thread David Waern
 Anyway... long ramble over... Emacs isn't my operating system of choice.
 I prefer to use SciTE (which is *just* a text editor - as in, it doesn't
 also come with an integrated toaster and alarm clock). One SciTE window
 open, one command prompt pointing at the source folder... seems to work
 fairly well. Would be nice if SciTE would colourise Haskell syntax, but
 since Haskell is so absurdly hard to parse, I guess that's asking a lot.
 ;-)

SciTE is based on the Scintilla editor which comes with a lexer for
Haskell.  It's not particularly good, but it's better than nothing. If the
latest version of SciTE doesn't support Haskell syntax highlighting then
it should be very easy for the developers to add.

/David

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


Re: [Haskell-cafe] Silly mail client

2007-05-06 Thread Daniel McAllansmith
On Sunday 06 May 2007 21:15, Andrew Coppin wrote:
 OK, this is hacking me off now... Does ANYBODY know how I can convince
 Thunderbird to send replies to Haskell Cafe rather than sending them to
 the original poster? This is really becoming tiresome...

Looks like you're on windows so maybe this is worthless information, but...

There seems to be an extension to add a Reply-To-List feature.  Apparently it 
requires a patch that has been applied by Debian, Suse and Gentoo.  Dunno 
whether you can get it to work with windows.

Heres a link:
http://alumnit.ca/wiki/index.php?page=ReplyToListThunderbirdExtension
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Mounting haskell.org wiki under WikipediaFS?

2007-05-06 Thread Donald Bruce Stewart
Anyone tried editing haskell.org's wiki as text, using:

http://wikipediafs.sourceforge.net/

WikipediaFS is a mountable Linux virtual file system that enables you
to deal with Wikipedia (or any Mediawiki-based site) articles as if they
were real files. It is thus possible to use a real text editor to view
and edit articles.

Seems like this might make some of the larger edit passes a lot easier.

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


RE: [Haskell-cafe] Is Excel a FP language?

2007-05-06 Thread Tim Docker
The pivotal project:

http://www.cs.kent.ac.uk/projects/pivotal/

is more or less what you are referring to (ie an interactive environment
where haskell is the evaluation language), though it doesn't have the
exact GUI of a spreadsheet.

Tim



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew Coppin
Sent: Saturday, 5 May 2007 9:43 PM
To: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Is Excel a FP language?


I just had a thought... Why doesn't somebody implement a spreadsheet
where Haskell is the formula language? 8-) 

I have already been struggling (unsuccessfully) to write a program to
graph functions, but why not go the whole hog and make an entire
spreadsheet program?

Possibly one of the most depressing things about Haskell is that there
isn't one single large application anywhere that you can point to and
say this was made with Haskell. Maybe this could be that app?


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


Re: [Haskell-cafe] Mounting haskell.org wiki under WikipediaFS?

2007-05-06 Thread Chris Mears
[EMAIL PROTECTED] (Donald Bruce Stewart) writes:

 Anyone tried editing haskell.org's wiki as text, using:

 http://wikipediafs.sourceforge.net/

I have now, and it works.  To test it out, do the following:

 - install wikipediafs (it's in Debian's repo., and probably others)
 - $ mkdir wikis (or some other name)
 - $ mount.wikipediafs wikis
 - $ fusermount -u wikis

This creates a default configuration file in ~/.wikipediafs/config.xml.
Edit this, and insert the haskell.org info:

  site
   dirnamehaskellwiki/dirname
   hostwww.haskell.org/host
   basename/haskellwiki/index.php/basename
   usernameUSERNAME/username
   passwordPASSWORD/password
   /site

Fill in USERNAME and PASSWORD appropriately.  Now, mount the directory
again:

  - $ mount.wikipediafs wikis
  - $ cd wikis/haskellwiki

There are no files (yet), but when you try to access a file, it will
appear.

  - $ head Humor

... will print the first few lines of the Humor page.  Now you can edit
it and save the file, and the changes will be in the wiki.  Happy
editing.

(You can apparently include a summary of your changes in the file, as
documentation for the change.  See the mount.wikipediafs man page.)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell Weekly News: May 07, 2007

2007-05-06 Thread Donald Bruce Stewart
---
Haskell Weekly News
http://sequence.complete.org/hwn/20070507
Issue 62 - May 07, 2007
---

   Welcome to issue 62 of HWN, a weekly newsletter covering developments
   in the [1]Haskell community.

   This week sees the release of Atom, a hardware description language
   embedded in Haskell, along with the usual suite of new libraries and
   tools. In addition, The Monad.Reader Issue 7 was released, and the
   hackage upload festival continues unabated.

   1. http://haskell.org/

Announcements

   Atom: Hardware Description in Haskell. Tom Hawkins [2]announced the
   release of [3]Atom, a high-level hardware description language
   embedded in Haskell, compiles conditional term rewriting systems into
   conventional HDL.

   2. http://article.gmane.org/gmane.comp.lang.haskell.general/15209
   3. http://www.funhdl.org/

   The Monad.Reader: Issue 7. Wouter Swierstra [4]announced the latest
   issue of [5]The Monad.Reader. The Monad.Reader is a quarterly magazine
   about functional programming. It is less-formal than journal, but
   somehow more enduring than a wiki page or blog post.

   4. http://article.gmane.org/gmane.comp.lang.haskell.cafe/22038
   5. http://www.haskell.org/haskellwiki/The_Monad.Reader

   HDBC: Haskell Database Connectivity. John Goerzon [6]announced that
   [7]HDBC 1.1.2 is now released. HDBC provides an abstraction layer
   between Haskell programs and SQL relational databases. This lets you
   write database code once, in Haskell, and have it work with any number
   of backend SQL databases.

   6. http://article.gmane.org/gmane.comp.lang.haskell.general/15227
   7. http://software.complete.org/hdbc

   FileManip: Expressive Filesystem Manipulation. Bryan O'Sullivan
   [8]announced the [9]FileManip package provides expressive functions
   and combinators for searching, matching, and manipulating files.

   8. http://article.gmane.org/gmane.comp.lang.haskell.cafe/22090
   9. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/FileManip-0.1

   photoname: manipulate photos using EXIF data. Dino Morelli
   [10]announced the release of [11]photoname, a command-line utility for
   renaming and moving photo image files. The new folder location and
   naming are determined by two things: the photo shoot date information
   contained within the file's EXIF tags and the usually-camera-assigned
   serial number, often appearing in the filename.

  10. http://article.gmane.org/gmane.comp.lang.haskell.general/15187
  11. http://ui3.info/d/proj/photoname.html

   RSA-Haskell: Command-line Cryptography. David Sankel [12]announced the
   release of [13]RSA-Haskell, a collection of command-line cryptography
   tools and a cryptography library written in Haskell. It is intended to
   be useful to anyone who wants to secure files or communications or who
   wants to incorporate cryptography in their Haskell application.

  12. http://article.gmane.org/gmane.comp.lang.haskell.general/15207
  13. http://www.netsuperbrain.com/rsa-haskell.html

   Haskell modes for Vim. Claus Reinke [14]summarised the various
   Haskell/Vim support currently available

  14. http://article.gmane.org/gmane.comp.lang.haskell.general/15180

   French Translation of Gentle Introduction to H98. The haskell-fr team
   [15]announced a completed a [16]translation into French of the 'Gentle
   Introduction to Haskell'.

  15. http://article.gmane.org/gmane.comp.lang.haskell.general/15193
  16. http://gorgonite.developpez.com/livres/traductions/haskell/gentle-haskell/

Haskell'

   This section covers the [17]Haskell' standardisation process.

 * [18]Polymorphic strict fields

  17. http://hackage.haskell.org/trac/haskell-prime
  18. http://thread.gmane.org/gmane.comp.lang.haskell.prime/2192

Hackage

   This week's new libraries in [19]the Hackage library database.

  19. http://hackage.haskell.org/

 * BitSyntax-0.2. Adam Langley. [20]A simple function for the
   construction of binary data.

  20. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/BitSyntax-0.2

 * filepath-1.0. Neil Mitchell. [21]Library for manipulating
   FilePath's in a cross platform way.

  21. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/filepath-1.0

 * Chart-2007.3.5. Tim Docker [22]A library for generating 2D Charts
   and Plots.

  22. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Chart-2007.3.5

 * FileManip-0.1. Bryan O'Sullivan [23]A Haskell library for working
   with files and directories.

  23. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/FileManip-0.1

 * hsns-0.5.2. Austin Seipp [24]A network sniffer written in a purely
   fun language.

  24. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hsns-0.5.2

 * template-0.1. Johan Tibell [25]Simple string substitution library
   that