Re: [Haskell-cafe] library on common sub-expression elimination?

2011-08-11 Thread Stephen Tetley
Wouldn't this be dependent upon your AST and thus not readily package-able as a library? Expression simplification has been a prime example for Strafunski style traversal libraries. You might be able to find examples that you can adapt to your own AST written with Uniplate or similar library. On

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread Max Bolingbroke
On 11 August 2011 05:17, John Millikin jmilli...@gmail.com wrote: This is just a quick package I whipped up out of frustration with test-framework scrolling an error message out of sight, for the millionth time. Patches to make test-framework less noisy (either by default or with a flag) will

Re: [Haskell-cafe] library on common sub-expression elimination?

2011-08-11 Thread Anton Kholomiov
Thank you for the reference to Strafunski libraries, I read HaskellWiki, but I don't have a permission to visit their site. All links are forbidden. Can it be a function: fun :: Eq a = Tree a - [(Int, (a, [Int]))] where tuple codes nodes, and Int's code edges. 2011/8/11 Stephen Tetley

Re: [Haskell-cafe] ANNOUNCE: yap-0.0 - yet another prelude

2011-08-11 Thread Sebastian Fischer
[switched to Cafe] On Wed, Aug 10, 2011 at 11:46 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Wed, 10 Aug 2011, Paterson, Ross wrote: Yet another restructuring of the Prelude numeric classes on algebraic lines, proposed for a revision of the Haskell Prelude:

Re: [Haskell-cafe] ANNOUNCE: yap-0.0 - yet another prelude

2011-08-11 Thread Henning Thielemann
On Thu, 11 Aug 2011, Sebastian Fischer wrote: [switched to Cafe] On Wed, Aug 10, 2011 at 11:46 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Wed, 10 Aug 2011, Paterson, Ross wrote: Yet another restructuring of the Prelude numeric classes on algebraic lines, proposed for a

Re: [Haskell-cafe] library on common sub-expression elimination?

2011-08-11 Thread Stephen Tetley
Strafunski and its successors (Uniplate, SYB, KURE) are really for working on trees. If you want to work on graphs you would probably be better of with something else. I think I overlooked that you want common sub-expression _elimination_, rather than expression simplification. There are

Re: [Haskell-cafe] New releases and BSD3 license

2011-08-11 Thread Yitzchak Gale
Thanks for the more permissive licenses. And most of all, thanks for all your great work on HDBC as maintainer. Thanks and good luck to Nicolas. Regards, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] library on common sub-expression elimination?

2011-08-11 Thread Vo Minh Thu
I guess you refer to data-reify: http://hackage.haskell.org/package/data-reify 2011/8/11 Stephen Tetley stephen.tet...@gmail.com: Strafunski and its successors (Uniplate, SYB, KURE) are really for working on trees. If you want to work on graphs you would probably be better of with something

[Haskell-cafe] Additional functions of GMP

2011-08-11 Thread Artyom Kazak
GMP has a lot of functions, such as extracting roots, primality test, Legendre symbol, factorial and so on. These can be written in Haskell, of course, but isn't it better to use existing functions? They are also much faster than similar functions from NumericPrelude, I believe. I have

Re: [Haskell-cafe] ANNOUNCE: yap-0.0 - yet another prelude

2011-08-11 Thread Paterson, Ross
Sebastian Fischer [fisc...@nii.ac.jp] wrote: I'm curious: what laws do you have in mind for '+', '-', and '0' that do not hold in the multiplicative group of rational numbers with (+) = (*); (-) = (/); 0 = 1 ? x - x = zero, for one. (with x the other 0)

Re: [Haskell-cafe] Additional functions of GMP

2011-08-11 Thread Daniel Fischer
On Thursday 11 August 2011, 14:06:21, Artyom Kazak wrote: GMP has a lot of functions, such as extracting roots, primality test, Legendre symbol, I'm writing a package (arithmoi) that will include reasonably fast implementations of those, but I never find the time to finish it :( factorial

[Haskell-cafe] Distributions link on Hackage

2011-08-11 Thread Peter Simons
Hi, the home page of a package on Hackage links to various distributions to show which versions are available, i.e. Fedora, Debian, FreeBSD, etc. In NixOS, we have fairly up-to-date package set, and I would like to see that distribution included on Hackage. Now I wonder how to get that done? Can

[Haskell-cafe] Can I have a typeclass for topological spaces?

2011-08-11 Thread Grigory Sarnitskiy
Hello! I just wonder whether it is possible to have a typeclass for topological spaces? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread Greg Weber
Hi John, I am wondering if you have seen the hspec package? [1] It seems to solve all the problems you are with chell, including that it silences Hunit output. We are using it for all the Yesod tests now. Thanks, Greg Weber [1]:

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread John Millikin
I have, but it's not quite what I'm looking for: - I don't want to silence HUnit's output, I just don't want anything to show on the console when a test *passes*. Showing output on a failure is good. - I'm not interested in BDD. Not to say it's not useful, but it doesn't match my style of

[Haskell-cafe] Trouble with readProcess

2011-08-11 Thread Charles-Pierre Astolfi
Hi -cafe, I'm using readProcess and I don't know how to handle this issue: readProcess cmd [opt1,opt2] seems to execute the following: $ cmd opt1 opt2 That is usually fine, but I'm using an external program that doesn't understand the quotes, so I need to execute instead: $ cmd opt1 opt2 How

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread John Millikin
I tried, actually, but couldn't figure out how to separate running the test from printing its output. All the attempted patches turned into huge refactoring marathons. When given the choice between sending a huge replace all your code with my code patch, and just releasing a separate package, I

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread Greg Weber
It silences HUnit's output, but will tell you what happens when there is a failure- which I think is what you want. There are a few available output formatters if you don't like the default output, or you can write your own output formatter. BDD is really a red herring. Instead of using function

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread John Millikin
On Thu, Aug 11, 2011 at 07:52, Greg Weber g...@gregweber.info wrote: It silences HUnit's output, but will tell you what happens when there is a failure- which I think is what you want. There are a few available output formatters if you don't like the default output, or you can write your own

Re: [Haskell-cafe] Additional functions of GMP

2011-08-11 Thread Artyom Kazak
I'm writing a package (arithmoi) that will include reasonably fast implementations of those, but I never find the time to finish it :( Package is great, but sometimes it is useful to have such functions out of box (for example, when solving SPOJ problems). No, you can't, unfortunately (not

Re: [Haskell-cafe] Trouble with readProcess

2011-08-11 Thread Donn Cave
Quoth Charles-Pierre Astolfi c...@crans.org, readProcess cmd [opt1,opt2] seems to execute the following: $ cmd opt1 opt2 That is usually fine, but I'm using an external program that doesn't understand the quotes, so I need to execute instead: $ cmd opt1 opt2 How should I do that? I think

Re: [Haskell-cafe] Can I have a typeclass for topological spaces?

2011-08-11 Thread Grigory Sarnitskiy
Oh, I guess the class would look something like that: class TopologicalSpace a where ifOpen :: (Subset a) - Bool and Subset x is a type corresponding to subsets of x. 11.08.2011, 17:52, Grigory Sarnitskiy sargrig...@ya.ru: Hello! I just wonder whether it is possible to have a typeclass for

Re: [Haskell-cafe] Trouble with readProcess

2011-08-11 Thread Christian Maeder
Am 11.08.2011 16:45, schrieb Charles-Pierre Astolfi: Hi -cafe, I'm using readProcess and I don't know how to handle this issue: readProcess cmd [opt1,opt2] seems to execute the following: are you sure that your argument strings do not contain the quotes, possibly by calling show on

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread Greg Weber
I am confused also, as to both what output you don't like that motivated chell and what exactly hspec silences :) Suffice to say I am able to get a small relevant error message on failure with hspec. I am adding the hspec maintainer to this e-mail- he can answer any of your questions. On Thu, Aug

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread John Millikin
On Thu, Aug 11, 2011 at 08:17, Greg Weber g...@gregweber.info wrote: I am confused also, as to both what output you don't like that motivated chell and what exactly hspec silences :) Suffice to say I am able to get a small relevant error message on failure with hspec. I am adding the hspec

Re: [Haskell-cafe] Trouble with readProcess

2011-08-11 Thread Charles-Pierre Astolfi
I've found my mistake: I was calling readProcess cmd [-p -t] instead of readProcess cmd [-p,-t] Not sure what are the semantics of quotation in this case, though. And I'm pretty sure my analysis is wrong because of that :) -- Cp On Thu, Aug 11, 2011 at 16:05, Donn Cave d...@avvanta.com wrote:

Re: [Haskell-cafe] New releases and BSD3 license

2011-08-11 Thread John Goerzen
Thanks, Jeremy -- appreciate it! -- John On 08/10/2011 02:57 PM, Jeremy Shaw wrote: Awesome! I believe MissingH includes some code that I contributed (or used to). That can all be licensed BSD3. - jeremy On Wed, Aug 10, 2011 at 2:14 PM, John Goerzenjgoer...@complete.org wrote: Hello, I

Re: [Haskell-cafe] Trouble with readProcess

2011-08-11 Thread Donn Cave
Quoth Charles-Pierre Astolfi c...@crans.org, I've found my mistake: I was calling readProcess cmd [-p -t] instead of readProcess cmd [-p,-t] That would do it. Not sure what are the semantics of quotation in this case, though. And I'm pretty sure my analysis is wrong because of that :) The

[Haskell-cafe] Generics (SYB) with parametrized types

2011-08-11 Thread JP Moresmau
Hello, I'm banging my head against a wall there trying to use the syb generics schemes against the GHC API. I'm looking at implementing a search mechanism in the AST in the more direct way that what Scion does (creating an instance of a TypeClass for each AST node type). Since the GHC AST types

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread Nathan Howell
Is this different than the --hide-successes flag for test-framework? Looks like it was added a few months back: https://github.com/batterseapower/test-framework/commit/afd7eeced9a4777293af1e17eadab4bf485fd98f -n On Thu, Aug 11, 2011 at 8:21 AM, John Millikin jmilli...@gmail.com wrote: The

Re: [Haskell-cafe] How to use cabal macros in .hsc files

2011-08-11 Thread Henning Thielemann
On 08.08.2011 12:08, Bas van Dijk wrote: Hello, Currently it's not possible to use cabal macros like MIN_VERSION_base(x,y,z) in .hsc files: http://hackage.haskell.org/trac/hackage/ticket/870 Is there a workaround to get the same effect? Writing a plain Haskell module that contains the code

Re: [Haskell-cafe] Help understanding Haskell runtime costs

2011-08-11 Thread Henning Thielemann
On 09.08.2011 01:43, Thiago Negri wrote: Hello all, I'm relatively new to Haskell and trying to solve some online judge's problems in it. One of the problems is to say if a given sentence is a tautogram or not. A tautogram is just a sentence with all the words starting with the same letter. My

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread John Millikin
Possible -- I ran into dependency conflicts between t-f/t-f-q/quickcheck when trying to migrate to test-framework 0.4, so I clamped all my test subprojects to 0.3. On Thu, Aug 11, 2011 at 09:09, Nathan Howell nathan.d.how...@gmail.com wrote: Is this different than the --hide-successes flag for

Re: [Haskell-cafe] [Haskell] ANNOUNCE: GHC version 7.2.1

2011-08-11 Thread Henning Thielemann
On 09.08.2011 22:01, Ian Lynagh wrote: The GHC Team is pleased to announce a new major release of GHC, 7.2.1. The 7.2 branch is intended to be more of a technology preview than normal GHC stable branches; in particular, it supports a significantly improved version of DPH, as well as new

Re: [Haskell-cafe] Potential problem with AC-Vector-Fancy package

2011-08-11 Thread Andrew Coppin
On 10/08/2011 11:04 PM, Dave Tapley wrote: Is anyone maintaining the AC-Vector-Fancy package? I haven't had a reply from the latest maintainer (Andrew Coppin) on Hackage, so I thought I'd open it up to cafe: Oh, right. I haven't checked my mailbox recently... I think I have found a problem

Re: [Haskell-cafe] [Haskell] ANNOUNCE: GHC version 7.2.1

2011-08-11 Thread austin seipp
VECTORISE is for Data Parallel Haskell. It's only relevant to GHC's internal vectorisation pass - I don't actually think there is any use case for it in user code at the moment, it's only used by the DPH libraries/special prelude, etc. On Thu, Aug 11, 2011 at 12:16 PM, Henning Thielemann

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread trystan . s
As Greg pointed out, HSpec does have an option to output just the failed tests. I looked at the example on the Chell project home page and converted the example tests into these hspec style specs: import Test.Hspec (Specs, descriptions, describe, it) import Test.Hspec.Runner

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread Max Bolingbroke
On 11 August 2011 15:49, John Millikin jmilli...@gmail.com wrote: I tried, actually, but couldn't figure out how to separate running the test from printing its output. All the attempted patches turned into huge refactoring marathons. Just FYI test-framework already has exactly this split

Re: [Haskell-cafe] Trouble with readProcess

2011-08-11 Thread Brandon Allbery
On Thu, Aug 11, 2011 at 11:29, Charles-Pierre Astolfi c...@crans.org wrote: I've found my mistake: I was calling readProcess cmd [-p -t] instead of readProcess cmd [-p,-t] Not sure what are the semantics of quotation in this case, though. And I'm pretty sure my analysis is wrong because of

Re: [Haskell-cafe] Help understanding Haskell runtime costs

2011-08-11 Thread Thiago Negri
So, thanks to Henning Thielemann I was able to make a code a little more functional. I did find ByteString module that really speed things up. I got 0.04 seconds with the following snippet: -- code start import qualified Data.ByteString.Char8 as BS import Data.Char (toLower) main :: IO () main