Re: [Haskell-cafe] Cabal question, adding data files

2006-08-23 Thread Conrad Parker
On Wed, Aug 23, 2006 at 11:36:00PM +0100, Neil Mitchell wrote: > Hi > > >The field you want is data-files, documented in section 2.1.1 of the > >Cabal User's Guide. > > That looks perfect. Is there any reason that Alex doesn't use this? I > was trying to learn by example. Perhaps because Alex pr

Re: [Haskell-cafe] Fran - Functional Reactive Animation

2006-08-23 Thread Jared Updike
I think this works: http://haskell.org/edsl/pansharp.html Jared. On 8/23/06, HIGGINS Neil (ENERGEX) <[EMAIL PROTECTED]> wrote: Fran is a Haskell library (or "embedded language") for interactive animations with 2D and 3D graphics and sound. See and

[Haskell-cafe] Fran - Functional Reactive Animation

2006-08-23 Thread HIGGINS Neil (ENERGEX)
Title: Fran - Functional Reactive Animation Fran is a Haskell library (or "embedded language") for interactive animations with 2D and 3D graphics and sound. See and

Re: [Haskell-cafe] Proposal to allow {} instead of () in contexts

2006-08-23 Thread Brian Hulley
On August 23, 2006 5:16 PM, Brian Smith wrote On 8/23/06, Brian Hulley <[EMAIL PROTECTED]> wrote: Hi - Disregarding my last proposal which involved the use of {} in types, I am wondering if anyone would agree with me that it would be a good idea to use {} instead of () when writing out the con

Re: Re[2]: "class []" proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Toby Hutton
On 8/23/06, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote: I use the following script from vim to infer top level type declarationsfor me. I've found it particularly useful for understanding others' code:On the topic of coding Haskell with Vim is there an indentation plugin for Haskell available? 

Re: [Haskell-cafe] Cabal question, adding data files

2006-08-23 Thread Neil Mitchell
Hi The field you want is data-files, documented in section 2.1.1 of the Cabal User's Guide. That looks perfect. Is there any reason that Alex doesn't use this? I was trying to learn by example. Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Cabal question, adding data files

2006-08-23 Thread Ross Paterson
On Wed, Aug 23, 2006 at 10:42:54PM +0100, Neil Mitchell wrote: > I have a cabal executable, which requires additional data files. How > do I do this in Cabal? I have seen extra-source-files, but they are > not added at install time to the destination directory, which doesn't > help me. The field y

[Haskell-cafe] Cabal question, adding data files

2006-08-23 Thread Neil Mitchell
Hi, I have a cabal executable, which requires additional data files. How do I do this in Cabal? I have seen extra-source-files, but they are not added at install time to the destination directory, which doesn't help me. I noticed that Alex does this, but with a lot of Cabal calling in Setup.hs w

Re: [Haskell-cafe] implementing a csv reader

2006-08-23 Thread Robert Dockins
On Aug 23, 2006, at 3:37 PM, Henk-Jan van Tuyl wrote: L.S., Reading and writing a comma seperated datafile doesn't have to be that complicated; the following is an easy way to read a CSV file into a list of tuples and display the list on screen: "For every complex problem, there is a so

Re: [Haskell-cafe] implementing a csv reader

2006-08-23 Thread Henk-Jan van Tuyl
L.S., Reading and writing a comma seperated datafile doesn't have to be that complicated; the following is an easy way to read a CSV file into a list of tuples and display the list on screen: displayTuples = do csvData <- readFile "data.csv" putStrLn $ unlines $ map (show . readTu

Re: [Haskell-cafe] extreme newbie: hugs prompt vs load module

2006-08-23 Thread Shao Chih Kuo
You can always load things inside ghci with: :m i.e. Prelude> :m List Prelude List> :m Control.Concurrent Prelude Control.Concurrent> :m Control.Concurrent List Prelude List Control.Concurrent> George Young wrote: [linux, ghci 6.4.3.20060820, hugs May 2006] I have just started learning Haske

Re: [Haskell-cafe] extreme newbie: hugs prompt vs load module

2006-08-23 Thread Hans van Thiel
Hi, I'm a beginner too and I'm quite taken with 'Yet Another Haskell Tutorial' by Hal Daume III, which is available from the Haskell site. It really starts from scratch and it covers almost everything, as far as I can see. Because I'm a lone learner, I got stuck several times, but there are severa

Re: [Haskell-cafe] extreme newbie: hugs prompt vs load module

2006-08-23 Thread Bulat Ziganshin
Hello George, Wednesday, August 23, 2006, 6:16:12 PM, you wrote: > I'm confused about what sort of things I can type at the interpreter > prompt, and what things have to be loaded as a module. I keep trying > to treat the prompt like a lisp or python REPL, which is obviously > wrong. Can someon

Re: [Haskell-cafe] extreme newbie: hugs prompt vs load module

2006-08-23 Thread Brandon Moore
George Young wrote: [linux, ghci 6.4.3.20060820, hugs May 2006] I have just started learning Haskell. I have hugs and ghci under linux, and I'm going through the Gentle Introduction to Haskell, so far through section 4, "case expressions and pattern matching".

Re: [Haskell-cafe] Proposal to allow {} instead of () in contexts

2006-08-23 Thread Brian Smith
On 8/23/06, Brian Hulley <[EMAIL PROTECTED]> wrote: Hi -Disregarding my last proposal which involved the use of {} in types, I amwondering if anyone would agree with me that it would be a good idea to use{} instead of () when writing out the context ie: foo :: (Num a, Bar a) => a -> awould beco

Re: Re[2]: "class []" proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Tomasz Zielonka
On Wed, Aug 23, 2006 at 11:11:59PM +1000, Donald Bruce Stewart wrote: > So, from vim the following source: > > f (x,y,z) a b = y + a + b > > hit, 'ty' and its replaced with: > > f :: forall b c a. (Num b) => (a, b, c) -> b -> b -> b > f (x,y,z) a b = y + a + b Nice! Best regards To

Re: [Haskell-cafe] extreme newbie: hugs prompt vs load module

2006-08-23 Thread Robert Dockins
On Aug 23, 2006, at 10:16 AM, George Young wrote: [linux, ghci 6.4.3.20060820, hugs May 2006] I have just started learning Haskell. I have hugs and ghci under linux, and I'm going through the Gentle Introduction to Haskell, so far through section 4, "case expr

[Haskell-cafe] extreme newbie: hugs prompt vs load module

2006-08-23 Thread George Young
[linux, ghci 6.4.3.20060820, hugs May 2006] I have just started learning Haskell. I have hugs and ghci under linux, and I'm going through the Gentle Introduction to Haskell, so far through section 4, "case expressions and pattern matching". I'm a python programme

[Haskell-cafe] Proposal to allow {} instead of () in contexts

2006-08-23 Thread Brian Hulley
Hi - Disregarding my last proposal which involved the use of {} in types, I am wondering if anyone would agree with me that it would be a good idea to use {} instead of () when writing out the context ie: foo :: (Num a, Bar a) => a -> a would become: foo :: {Num a, Bar a} => a -> a an

Re: Re[2]: "class []" proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Donald Bruce Stewart
tomasz.zielonka: > On Wed, Aug 23, 2006 at 01:28:57PM +0100, Malcolm Wallace wrote: > > The lengths people will go to in making things difficult for the reader, > > just to save a few characters is truly amazing. Remember, the code will > > be read many more times than it is written. IMHO, the va

Re: Re[2]: "class []" proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Tomasz Zielonka
On Wed, Aug 23, 2006 at 01:28:57PM +0100, Malcolm Wallace wrote: > The lengths people will go to in making things difficult for the reader, > just to save a few characters is truly amazing. Remember, the code will > be read many more times than it is written. IMHO, the various proposed > sugar ad

Re[2]: [Haskell-cafe] Re: Memoizing longest-common-subsequence

2006-08-23 Thread Bulat Ziganshin
Hello Alistair, Wednesday, August 23, 2006, 1:43:30 PM, you wrote: > I've found the folder in which I did some of this testing, and GNU diff > has no problem with the input files; they're only 7M, My program spends > 70% of its time doing String-IO (so 30% in the algorithm), and peaks at > about

Re: Re[2]: "class []" proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Malcolm Wallace
> > it's because you not programmed a lot with type classes. if you > > start, you will soon realize that type signatures with classes are > > just unreadable. just look at sources of my streams library > > copyStream :: (BlockStream h1, BlockStream h2, Integral size) >=> h

RE: [Haskell-cafe] Re: Memoizing longest-common-subsequence

2006-08-23 Thread Bayley, Alistair
> From: Bayley, Alistair > > The performance I'm alluding to is not something I've tested > with any rigor, or even metrics to support. I simply needed > to compare a couple of large text files which GNU diff didn't > handle (I think when the input is over a certain size it > breaks it into ch

RE: [Haskell-cafe] Re: Memoizing longest-common-subsequence

2006-08-23 Thread Bayley, Alistair
> From: Jared Updike [mailto:[EMAIL PROTECTED] > > Thanks for posting the code. It works on pretty large data sets (for > example, a thousand Strings each) and I have a hunch that if I use > Data.ByteString it would even work fast enough on my quarter meg text > files (split on words, ~40,000 and

Re: [Haskell-cafe] Re: type synonym liberalization (was "class []" proposal)

2006-08-23 Thread Bulat Ziganshin
Hello Arie, Wednesday, August 23, 2006, 2:54:54 AM, you wrote: >> With the proper interpretation, type synonyms like >> type ABlockStream = BlockStream b => b >> type AMemoryStream = MemoryStream m => m > How does your proposal compare to introducing existential types proper? As in > type ABl