[Haskell-cafe] Request for code review: slice-1.0.0, TestSupport

2008-11-24 Thread Owen Smith
Hi all, Thanks for your welcome and helpful comments. I've banged out a first attempt at a Haskell library and was curious if anybody would have time or interest in looking it over it for style, design, stuff that's just wrong, or (most likely) stuff that's been done better elsewhere. I'm willing

Re: [Haskell-cafe] Request for code review: slice-1.0.0, TestSupport

2008-11-24 Thread wren ng thornton
Owen Smith wrote: Hi all, Thanks for your welcome and helpful comments. I've banged out a first attempt at a Haskell library and was curious if anybody would have time or interest in looking it over it for style, design, stuff that's just wrong, or (most likely) stuff that's been done better

[Haskell-cafe] Request for code review - Knuth Morris Pratt for Data.Sequence

2007-09-04 Thread Justin Bailey
Using the code developed for ByteStrings by myself, Christ Kuklewicz and Daniel Fischer, I've implemented Knuth-Morris-Pratt substring searching on Data.Sequence Seq values. Attached you'll find the library in kmp.zip.safe. The algorithm is implemented in the module Data.Sequence.KMP. At the

[Haskell-cafe] request for code review

2006-03-05 Thread Shannon -jj Behrens
Hi, I'm working on another article like http://www.linuxjournal.com/article/8850. This time, I'm taking an exercise out of Expert C Programming: Deep C Secrets and translating it into Haskell. The program translates C type declarations into English. I would greatly appreciate some code

Re: [Haskell-cafe] request for code review

2006-03-05 Thread Neil Mitchell
Hi, You seem to like let a lot, whereas I hardly ever use them. In general I find where a lot more readable. (disclaimer, all notes untested, may not compile, may be wrong) Also, most haskell programs use $ instead of | -- For convenience: currTokType :: ParseContext - TokenType currTokType

Re: [Haskell-cafe] request for code review

2006-03-05 Thread Brian Hulley
Neil Mitchell wrote: stackTop ctx = let (x:xs) = stack ctx in x stackTop ctx = head ctx stackTop ParseContext{stack=x:_} = x or: stackTop ctx = head (stack ctx) ===stackTop ctx = head . stack $ ctx ===stackTop = head . stack Regards, Brian.

Re: [Haskell-cafe] request for code review

2006-03-05 Thread Scott Turner
On 2006 March 05 Sunday 05:43, Shannon -jj Behrens wrote: classifyString s        = Token (whichType s) s   where whichType volatile = Qualifier         whichType void     = Type         whichType char     = Type         whichType signed   = Type         whichType unsigned = Type