[Haskell-cafe] Test access resources files in cabal-dev

2013-05-08 Thread Graham Berks
Hi, whats the recommended way to access a resource file for a test within cabal. I have a text file containing data that I use in a test and want to be able to access it in a root path independent manner. Thanks ___ Haskell-Cafe mailing list Haskel

Re: [Haskell-cafe] Test suite sections of cabal

2012-02-19 Thread 山本和彦
Hello Felipe, > If we have separate directories, then you can "build-depends: > own-package". This means that on the test suite's build-depends you > need to list only the dependencies that the test-suite needs, not > every dependency. Also, you don't need to constrain the version of > any dupli

Re: [Haskell-cafe] Test suite sections of cabal

2012-02-16 Thread Felipe Almeida Lessa
On Thu, Feb 16, 2012 at 7:24 AM, Kazu Yamamoto wrote: > Do you mean that if we separate directories for src and test, > build-depends of test-suite works, and if we don't separate, it does > not work? If we have separate directories, then you can "build-depends: own-package". This means that on

Re: [Haskell-cafe] Test suite sections of cabal

2012-02-16 Thread 山本和彦
>> 2) build-dependency >> >>  I need to repeat all build-dependency of a library section to >>  a test suite section. Specifying the library itself to >>  build-dependency of a test suite section does not work. >>  This violates the DRY philosophy. > > You may specify the same library as a depende

Re: [Haskell-cafe] Test suite sections of cabal

2012-02-16 Thread Felipe Almeida Lessa
On Thu, Feb 16, 2012 at 12:56 AM, Kazu Yamamoto wrote: > 2) build-dependency > >  I need to repeat all build-dependency of a library section to >  a test suite section. Specifying the library itself to >  build-dependency of a test suite section does not work. >  This violates the DRY philosophy.

[Haskell-cafe] Test suite sections of cabal

2012-02-15 Thread 山本和彦
Hello, I recently started using test suite sections of cabal but it soon appeared very inconvenient to me. 1) test data files If I want to include test data files into package, I have to enumerate all test files since the usage of '*' is restricted. I just want to specify the top directory

[Haskell-cafe] Test

2011-12-21 Thread Ertugrul Söylemez
This is a test. Please disregard. -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/ signature.asc Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-c

Re: [Haskell-cafe] Test

2010-11-30 Thread Miguel Mitrofanov
Missed. On 30 Nov 2010, at 23:47, Ian Lynagh wrote: > > A1 > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___ Haskell-Cafe maili

[Haskell-cafe] Test

2010-11-30 Thread Ian Lynagh
A1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Test command line programs

2010-10-28 Thread Dupont Corentin
Thanks for your responses. Of course I already test every pure parts of my program easily. For now, user input is treated in 2 different ways: - direct IO with hgetLine and like functions (blocking) - the same but I directly push the strings on a TChan for another thread to treat them (not blockin

Re: [Haskell-cafe] Test command line programs

2010-10-26 Thread Antoine Latter
On Tue, Oct 26, 2010 at 11:11 AM, Dupont Corentin wrote: > Hello again café, > > I have a command line program that takes input from various handles > (actually network sockets) like this: > >> s <- hGetLine h >> etc. > > I'd like to unit test this. How can I do? > I'd like to inject data on the h

Re: [Haskell-cafe] Test command line programs

2010-10-26 Thread Ben Millwood
On Tue, Oct 26, 2010 at 5:11 PM, Dupont Corentin wrote: > Hello again café, > > I have a command line program that takes input from various handles > (actually network sockets) like this: > >> s <- hGetLine h >> etc. > > I'd like to unit test this. How can I do? If all you ever do in some part of

Re: [Haskell-cafe] Test command line programs

2010-10-26 Thread Edward Z. Yang
Hello Dupont, If your code follows good style and has kept as much code out of IO as possible, you should be able to easily unit test the pure portions of your code. Otherwise, classic integration tests, by setting up the network jigs yourself, is standard. > Another little question: > How can I

[Haskell-cafe] Test command line programs

2010-10-26 Thread Dupont Corentin
Hello again café, I have a command line program that takes input from various handles (actually network sockets) like this: > s <- hGetLine h > etc. I'd like to unit test this. How can I do? I'd like to inject data on the handle so that all the input chain is tested. How are command line progra

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
> - Original Message - > From: José Romildo Malaquias > To: José Romildo Malaquias > Cc: haskell-cafe@haskell.org > Subject: Re: [Haskell-cafe] Test. Ignore. > Date: Wed, 21 Jul 2010 13:33:34 -0300 > > > On Wed, Jul 21, 2010 at 01:25:19PM -0300, &qu

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread Daniel Fischer
On Wednesday 21 July 2010 18:25:19, José Romildo Malaquias wrote: > > That was expected, as by default the "Avoid duplicate copies of > messages?" option is set to "Yes" in the mailing list membership > configuration. Now I have just set it to "No", and I expect to receive > both copies next time s

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
On Wed, Jul 21, 2010 at 01:25:19PM -0300, "José Romildo Malaquias" wrote: > > - Original Message - > > From: "José Romildo Malaquias" > > To: "José Romildo Malaquias" > > Cc: haskell-cafe@haskell.org > > Subject: Re: [Haskell-c

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
> - Original Message - > From: "José Romildo Malaquias" > To: "José Romildo Malaquias" > Cc: haskell-cafe@haskell.org > Subject: Re: [Haskell-cafe] Test. Ignore. > Date: Wed, 21 Jul 2010 13:09:16 -0300 > > > > - Original Message --

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
> - Original Message - > From: José Romildo Malaquias > To: José Romildo Malaquias > Cc: haskell-cafe@haskell.org > Subject: Re: [Haskell-cafe] Test. Ignore. > Date: Wed, 21 Jul 2010 13:01:03 -0300 > > > On Wed, Jul 21, 2010 at 12:53:53PM -0300, &qu

Re: [Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
On Wed, Jul 21, 2010 at 12:53:53PM -0300, "José Romildo Malaquias" wrote: > Please, ignore this message. Replying to the list and to the sender, to see if he gets both messages using a non gmail account. Romildo ___ Haskell-Cafe mailing list Haskell-Caf

[Haskell-cafe] Test. Ignore.

2010-07-21 Thread José Romildo Malaquias
Please, ignore this message. Romildo -- ___ Surf the Web in a faster, safer and easier way: Download Opera 9 at http://www.opera.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.

Re: [Haskell-cafe] Test cases for type inference

2009-10-21 Thread Peter Verswyvelen
Thanks Job & Martijn for the feedback. I would like to write a type inferrer that is mostly Haskell 98 with Trex row polymorphism extensions (a bit like CAL I guess). That will certainly take a while because I'm also studying the theory in my spare time. So as soon as (or if) I have something wo

Re: [Haskell-cafe] Test cases for type inference

2009-10-21 Thread jur
On Tue, Oct 20, 2009 at 10:07 AM, Peter Verswyvelen wrote: For learning, I would like to develop my own implementation of type inference, based on the paper "Typing Haskell in Haskell". At first sight, the source code of THIH contains a small number of tests, but I was wandering if a large t

Re: [Haskell-cafe] Test cases for type inference

2009-10-21 Thread Job Vranish
I was recently working on an type inference algorithm and to test it I did the following: Used the quickcheck Arbitrary typeclass to generate expressions Inferred types of the expressions using my algorithm, converted the expressions that passed inference to haskell and wrote them to a file (

Re: [Haskell-cafe] Test cases for type inference

2009-10-21 Thread Martijn van Steenbergen
Peter Verswyvelen wrote: For learning, I would like to develop my own implementation of type inference, based on the paper "Typing Haskell in Haskell". At first sight, the source code of THIH contains a small number of tests, but I was wandering if a large test set exist? I'm pretty sure GHC m

[Haskell-cafe] Test cases for type inference

2009-10-20 Thread Peter Verswyvelen
For learning, I would like to develop my own implementation of type inference, based on the paper "Typing Haskell in Haskell". At first sight, the source code of THIH contains a small number of tests, but I was wandering if a large test set exist? Thanks, Peter ___

[Haskell-cafe] test-framework success

2009-06-27 Thread Simon Michael
Max - I was thinking about how to drive my new shell tests with your framework. I have: data ShellTest = ShellTest { filename ∷ String ,command ∷ String ,stdin∷ Maybe String ,stdoutExpected ∷ Maybe String ,stderrExpected ∷ Maybe String ,

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-06 Thread Anish Muttreja
On Thu, Mar 05, 2009 at 03:43:22PM -0500, Thomas DuBuisson wrote: > >> getFileStatus, fileSize ... > > > > Great, thanks. > > BTW, Hoogle does not seem to  know about > > System.Posix.Files, though it did point me to System.IO.FileSize > > which would also have served the purpose. > > Yep, this wa

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Thomas DuBuisson
>> getFileStatus, fileSize ... > > Great, thanks. > BTW, Hoogle does not seem to  know about > System.Posix.Files, though it did point me to System.IO.FileSize > which would also have served the purpose. Yep, this was discussed in a Hoogle and Network.Socket thread I started last week. There is a

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Neil Mitchell
Hi > I am on Linux. BTW, Hoogle does not seem to  know about > System.Posix.Files, though it did point me to System.IO.FileSize > which would also have served the purpose. To build the Hoogle libraries I need to build the packages. I run Windows not Linux, so its a bit difficult to index System.P

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Anish Muttreja
On Thu, Mar 05, 2009 at 08:15:03PM +0100, Daniel Fischer wrote: > Am Donnerstag, 5. März 2009 19:56 schrieb Anish Muttreja: > > I am looking for a way to test if a file is empty. > > Something like isFileEmpty along the lines of > > System.Directory.doesFileExist? > > If you're on a *nixy OS, > S

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Henk-Jan van Tuyl
On Thu, 05 Mar 2009 19:56:42 +0100, Anish Muttreja wrote: I am looking for a way to test if a file is empty. Something like isFileEmpty along the lines of System.Directory.doesFileExist? A function that wraps stat would also serve the purpose. I get the feeling that someone must have felt th

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Daniel Fischer
Am Donnerstag, 5. März 2009 19:56 schrieb Anish Muttreja: > I am looking for a way to test if a file is empty. > Something like isFileEmpty along the lines of > System.Directory.doesFileExist? If you're on a *nixy OS, System.Posix.Files getFileStatus, fileSize ... dunno if Windows has similar f

[Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Anish Muttreja
I am looking for a way to test if a file is empty. Something like isFileEmpty along the lines of System.Directory.doesFileExist? A function that wraps stat would also serve the purpose. I get the feeling that someone must have felt the need for this before me, but Google search not yield anythin

Re: [Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-30 Thread Thomas Hartman
I think the reason it took longer to build HAppS-Server is that previously, when I was installing the MyProject example from happs.org I was using searchpath. I guess searchpath doesn't compile every single haskell module, whereas runghc Setup build and cabal install does. 2008/5/29 Spencer Janss

Re: [Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-30 Thread Duncan Coutts
On Thu, 2008-05-29 at 20:12 -0700, Philip Neustrom wrote: > I'm having issues trying to get cabal-install (latest darcs) > installed, as well. I'm seeing the message: > > Hackage/Types.hs:19:29: > Module `Distribution.Version' does not export `Dependency' > > which was mentioned on this li

Re: happs install seems to have become very slow since upgrading cabal Re: [Haskell-cafe] test driving cabal install...

2008-05-29 Thread Jeremy Shaw
At Thu, 29 May 2008 19:19:48 -0700, Thomas Hartman wrote: > > It did finish, but I still feel like this took too long. Facebook does take several minutes to compile and consumes quite a bit of memory while doing it. If you machine does not have atleast 1GB of memory it could be thrashing due to s

Re: [Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-29 Thread Spencer Janssen
On Thu, May 29, 2008 at 06:11:04PM -0700, Thomas Hartman wrote: > After a little drama with zlib, I managed to get cabal-install installed. > > I then attempted to do > > cabal install HAppS-Server > > since this is a module with a lot of dependencies, and in rapid > development flux, so perenia

Re: [Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-29 Thread Philip Neustrom
Excerpts from Thomas Hartman's message of Thu May 29 18:11:04 -0700 2008: > After a little drama with zlib, I managed to get cabal-install installed. > > I then attempted to do > > cabal install HAppS-Server > > since this is a module with a lot of dependencies, and in rapid > development flux,

Re: [Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-29 Thread Thomas Hartman
mistaske, that last comment should have gone on another thread. 2008/5/29 Thomas Hartman <[EMAIL PROTECTED]>: > By the way, it just finally finished. > > I still think it took way too long. > > thomas. > > 2008/5/29 Thomas Hartman <[EMAIL PROTECTED]>: >> I see. I had done >> >> sudo cabal install

Re: happs install seems to have become very slow since upgrading cabal Re: [Haskell-cafe] test driving cabal install...

2008-05-29 Thread Thomas Hartman
It did finish, but I still feel like this took too long. 2008/5/29 Thomas Hartman <[EMAIL PROTECTED]>: > sudo cabal install --global HAppS-State went fine, and ghc-pkg had > output on just the one (global) file. > > but sudo cabal install --global HAppS-Server is slooow. > > I finally canceled

Re: [Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-29 Thread Thomas Hartman
By the way, it just finally finished. I still think it took way too long. thomas. 2008/5/29 Thomas Hartman <[EMAIL PROTECTED]>: > I see. I had done > > sudo cabal install HAppS-Server > > but this just installed with root ownership in my home directory. > > I'm now trying with > > sudo cabal ins

happs install seems to have become very slow since upgrading cabal Re: [Haskell-cafe] test driving cabal install...

2008-05-29 Thread Thomas Hartman
sudo cabal install --global HAppS-State went fine, and ghc-pkg had output on just the one (global) file. but sudo cabal install --global HAppS-Server is slooow. I finally canceled this and did sudo runghc Setup.hs build -v3 with the same result: extremely, extremely slow compile. It seems t

Re: [Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-29 Thread Thomas Hartman
I see. I had done sudo cabal install HAppS-Server but this just installed with root ownership in my home directory. I'm now trying with sudo cabal install --global HAppS-Server 2008/5/29 Daniel Patterson <[EMAIL PROTECTED]>: > I think you need to install HAppS-Data etc globally... I'm not sur

Re: [Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-29 Thread Daniel Patterson
I think you need to install HAppS-Data etc globally... I'm not sure why locally installed (ie, only your user) packages wouldn't be picked up by runghc Setup.hs'ing, but if they are install system wide it should definitely work. I think it is cabal --global install foo On Thu, 29 May 2008 18:11:0

[Haskell-cafe] test driving cabal install... cabal install and normal install (runghc Setup) don't mix... two package.conf files...

2008-05-29 Thread Thomas Hartman
After a little drama with zlib, I managed to get cabal-install installed. I then attempted to do cabal install HAppS-Server since this is a module with a lot of dependencies, and in rapid development flux, so perenially painful for me to install. The result is that I managed to install everythi

[Haskell-cafe] test message

2006-07-20 Thread Simon Marlow
Trying to diagnose problems with mailing lists... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe