Re: [Haskell-cafe] Hacking Hawk

2006-03-06 Thread Cale Gibbard
You may wish to read http://www.haskell.org/haskellwiki/Arrays which is quite a good tutorial on how the various array types and classes work. - Cale On 01/03/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hawk didn't updated from GHC v4.04. It does contain dependencies on functions that are

Re: [Haskell-cafe] Layout rule (was Re: PrefixMap: code reviewrequest)

2006-03-06 Thread Malcolm Wallace
Brian Hulley wrote: However I think there is an error in the description of this in section 2.7 of the Haskell98 report, which states: If the indentation of the non-brace lexeme immediately following a where, let, do or of is less than or equal to the current indentation level, then

Re: [Haskell-cafe] Credit Card Authorization code

2006-03-06 Thread Nils Anders Danielsson
On Thu, 02 Mar 2006, S. Alexander Jacobson [EMAIL PROTECTED] wrote: I am looking for Haskell code that does credit card authorization? e.g. paypal website pro does not supply a Haskell lib. I think that WASH/CGI contains code for doing some sort of checksum check on credit card numbers:

Re: [Haskell-cafe] Layout rule (was Re: PrefixMap: code reviewrequest)

2006-03-06 Thread Malcolm Wallace
Daniel Fischer [EMAIL PROTECTED] wrote: At the beginning of the module, there is _no_ current indentation level - thus the fourth equation of L applies. I think, the third from last equation of L applies, since If the first lexeme of a module is _not_ { or module, then it is preceded by

Re: [Haskell-cafe] Layout rule (was Re: PrefixMap: code reviewrequest)

2006-03-06 Thread Brian Hulley
Malcolm Wallace wrote: Brian Hulley wrote: However I think there is an error in the description of this in section 2.7 of the Haskell98 report, which states: If the indentation of the non-brace lexeme immediately following a where, let, do or of is less than or equal to the current

[Haskell-cafe] Comparing programs

2006-03-06 Thread Harry Chesley
This is more of an algorithm question than a language question, but any insights would be much appreciated. The problem is to input a series of programs and find previous occurrences of the same algorithm. The programs consist of a set of input parameters (a, b, c, ...), and a set of

Re: [Haskell-cafe] Comparing programs

2006-03-06 Thread Robert Dockins
On Mar 6, 2006, at 1:05 PM, Harry Chesley wrote: This is more of an algorithm question than a language question, but any insights would be much appreciated. The problem is to input a series of programs and find previous occurrences of the same algorithm. The programs consist of a set of

Re: [Haskell-cafe] Comparing programs

2006-03-06 Thread Jacques Carette
I believe you might be able to use (commutative) anti-unification, also known as generalization for this task. Jacques Harry Chesley wrote: This is more of an algorithm question than a language question, but any insights would be much appreciated. The problem is to input a series of programs

Re: [Haskell-cafe] Comparing programs

2006-03-06 Thread Brian Hulley
Harry Chesley wrote: But here's the thing that makes it hard (at least for me): two programs are considered the same if they can be made to match by rearranging the order of the input parameters. I.e., f(a), g(b) is the same as f(b), g(a). Although parameters can be reordered, they cannot be

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-06 Thread Shannon -jj Behrens
By the way, thanks for everyone's comments so far! They're very helpful! Also, most haskell programs use $ instead of | -- For convenience: currTokType :: ParseContext - TokenType currTokType ctx = ctx | currTok | tokenType this could be written as: tokenType $ currTok $ ctx

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-06 Thread Brian Hulley
Shannon -jj Behrens wrote: I find ctx | currTok | tokenType to be more readable than tokenType $ currTok $ ctx because you're not reading the code in reverse. That's my primary complaint with . and $. That's especially the case when I'm spreading the code over multiple lines: -- Translate a C

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-06 Thread Udo Stenzel
Shannon -jj Behrens wrote: I find ctx | currTok | tokenType to be more readable than tokenType $ currTok $ ctx because you're not reading the code in reverse. That's my primary complaint with . and $. Seconded. That's why I'd like to see the arguments to (.) swapped, but it's too late for

[Haskell-cafe] Re: mediawiki syntax highlighting plugins

2006-03-06 Thread Ashley Yakeley
Johannes Ahlmann wrote: an alternative would be geshi (http://qbnz.com/highlighter/) for which a mediawiki plugin also exists (http://meta.wikimedia.org/wiki/GeSHiHighlight), but it says on the geshi site GeSHi supports PHP5 and Windows. and i'm not clear whether they mean it _also_ supports

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-06 Thread Bill Wood
On Mon, 2006-03-06 at 11:25 -0800, Shannon -jj Behrens wrote: . . . I find ctx | currTok | tokenType to be more readable than tokenType $ currTok $ ctx because you're not reading the code in reverse. That's my primary complaint with . and $. That's especially the case when I'm spreading