[Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Niklas Hambüchen
Impressed by the productivity of my Ruby-writing friends, I have recently come across Cucumber: http://cukes.info It is a great tool for specifying tests and programs in natural language, and especially easy to learn for beginners. I propose that we add a Cucumber syntax for Haskell, with the ex

[Haskell-cafe] This is a mail system test, please ignore

2013-09-10 Thread John Wiegley
Testing the new e-mail services at haskell.org. -- John Wiegley FP Complete Haskell tools, training and consulting http://fpcomplete.com johnw on #haskell/irc.freenode.net ___ Haskell-Cafe mailing list Haskell-Cafe@

[Haskell-cafe] Please excuse brief service disruption

2013-09-10 Thread John Wiegley
The e-mail services at haskell.org were switched from exim4 to postfix tonight, please excuse the service disruption. For about one hour e-mails were not being accepted to the mailing lists. All should be resolved now. -- John Wiegley FP Complete Haskell tools, training

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread John Wiegley
> Niklas Hambüchen writes: > Code written in cucumber syntax is concise and easy to read concise |kənˈsīs|, adj. giving a lot of information clearly and in a few words; brief but comprehensive. Compare: Scenario: Defining the function foldl Given I want do define fol

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread AlanKim Zimmerman
I think the normal motivation for cucumber syntax is that it is a way to communicate requirements with non-technical people. On Tue, Sep 10, 2013 at 11:48 AM, John Wiegley wrote: > > Niklas Hambüchen writes: > > > Code written in cucumber syntax is concise and easy to read > > concise

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Edward Z. Yang
This is completely irrelevant, but the .chs extension is already taken by the c2hs tool. Cheers, Edward Excerpts from Niklas Hambüchen's message of Tue Sep 10 00:30:41 -0700 2013: > Impressed by the productivity of my Ruby-writing friends, I have > recently come across Cucumber: http://cukes.info

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Daisuke Fujimura
To be exact, the syntax is Gherkin not cucumber. https://github.com/cucumber/cucumber/wiki/Gherkin And, there's already a library to run specs written in Gherkin. https://github.com/marcotmarcot/chuchu On Tue, Sep 10, 2013 at 7:08 PM, Edward Z. Yang wrote: > This is completely irrelevant, but

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread sumit mahamuni
On Sep 10, 2013 3:25 PM, "AlanKim Zimmerman" wrote: > > I think the normal motivation for cucumber syntax is that it is a way to communicate requirements with non-technical people. +1 > > > On Tue, Sep 10, 2013 at 11:48 AM, John Wiegley wrote: >> >> > Niklas Hambüchen writes: >> >> > Code w

Re: [Haskell-cafe] [Haskell] Hackage 2 now available for beta testing

2013-09-10 Thread Ross Paterson
On Mon, Sep 09, 2013 at 07:23:59PM +0100, Duncan Coutts wrote: > Well-Typed and the Industrial Haskell Group (IHG) are very pleased to > announce that Hackage 2 is now available for public beta testing. The > plan is to do the final switchover in late September, to coincide > with ICFP. > > http:/

[Haskell-cafe] resources on static analysis

2013-09-10 Thread Maarten Faddegon
Dear list, I am interested in learning more about static analysis of Haskell code. Specifically of the relation between arguments of recursive and non-recursive calls. For example if we look at the ++ function from Prelude: (++) [] ys = ys (++) (x:xs) ys = x : xs ++ ys a

Re: [Haskell-cafe] resources on static analysis

2013-09-10 Thread Ian Ross
Not specifically about Haskell, but I read some lecture notes on this topic yesterday (by Michael Schwartzbach, PDF here: http://lara.epfl.ch/web2010/_media/sav08:schwartzbach.pdf). The notes do a good job of explaining how you set up lattices for various kinds of analyses, and how calculating fix

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Roman Cheplyaka
* John Wiegley [2013-09-10 04:48:36-0500] > > Niklas Hambüchen writes: > > > Code written in cucumber syntax is concise and easy to read > > concise |kənˈsīs|, adj. > > giving a lot of information clearly and in a few words; brief but > comprehensive. > > Compare: > > Sce

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Ian Ross
Me too, but I wasn't brave enough to say so after people seemed to be taking it seriously... On 10 September 2013 13:33, Roman Cheplyaka wrote: > * John Wiegley [2013-09-10 04:48:36-0500] > > > Niklas Hambüchen writes: > > > > > Code written in cucumber syntax is concise and easy to read

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Michael Snoyman
I'll admit, I also thought it was a joke. On Tue, Sep 10, 2013 at 2:34 PM, Ian Ross wrote: > Me too, but I wasn't brave enough to say so after people seemed to be > taking it seriously... > > > On 10 September 2013 13:33, Roman Cheplyaka wrote: > >> * John Wiegley [2013-09-10 04:48:36-0500] >

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Vo Minh Thu
The syntax is actually used by non-technical people to write tests. Using it to write Haskell code is a joke. (Using it for business specification is not, even if for technical people this seems overkill.) Thu 2013/9/10 Ian Ross : > Me too, but I wasn't brave enough to say so after people seemed

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Alberto G. Corona
That was done around 100 years ago with COBOL. 2013/9/10 Vo Minh Thu > The syntax is actually used by non-technical people to write tests. > Using it to write Haskell code is a joke. (Using it for business > specification is not, even if for technical people this seems > overkill.) > > Thu > >

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Thiago Negri
"Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented." [1] The example detailed how foldl is implemented. Also, as it is intended to be a DSL for *bus

Re: [Haskell-cafe] resources on static analysis

2013-09-10 Thread Alejandro Serrano Mena
If you are interested in general program analysis, I recommend you the book "Principles of Program Analysis" ] http://www.amazon.com/Principles-Program-Analysis-Flemming-Nielson/dp/3540654100]. It's very complete, and covers the most important kind of analyses that you can do (data-flow, constraint

Re: [Haskell-cafe] Looking for GUI examples

2013-09-10 Thread Sergey Mironov
Wow. Thanks! Looks impressive. Regards, Sergey 2013/9/10 Ivan Perez : > You may want to check one of Keera Studios' apps. All four of these do what > you want: > > https://github.com/ivanperez-keera/haskellifi-trayicon > https://github.com/ivanperez-keera/keera-diamondcard-sms-trayicon > https://

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Thiago Negri
I hope these jokes do not cause people to be afraid to post new ideas. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] GHC API question: Getting access to cpp processed source

2013-09-10 Thread Carter Schonwald
you need to run a preprocessor on it to remove the directives On Tue, Sep 10, 2013 at 4:03 PM, AlanKim Zimmerman wrote: > Hi Cafe > > I have just discovered that GHC.getTokenStream fails if it is used on a > module with CPP directives in it. > > This is reported in http://ghc.haskell.org/trac/gh

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Timon Gehr
On 09/10/2013 09:30 AM, Niklas Hambüchen wrote: Impressed by the productivity of my Ruby-writing friends, I have recently come across Cucumber: http://cukes.info It is a great tool for specifying tests and programs in natural language, and especially easy to learn for beginners. I propose that

Re: [Haskell-cafe] [Haskell] Hackage 2 now available for beta testing

2013-09-10 Thread Duncan Coutts
On Tue, 2013-09-10 at 12:10 +0100, Ross Paterson wrote: > On Mon, Sep 09, 2013 at 07:23:59PM +0100, Duncan Coutts wrote: > > Well-Typed and the Industrial Haskell Group (IHG) are very pleased to > > announce that Hackage 2 is now available for public beta testing. The > > plan is to do the final sw

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Artyom Kazak
On Wed, 11 Sep 2013 00:20:26 +0400, Thiago Negri wrote: I hope these jokes do not cause people to be afraid to post new ideas. Agreed. I would also like to clarify that my message was much more a joke on the incomprehensibility of legal acts than on the original proposal. By the way, I am

[Haskell-cafe] Mistakes in documentation for weak pointers?

2013-09-10 Thread Heinrich Apfelmus
Dear café, I'm currently studying weak pointers in order to implement garbage collection for a small JavaScript FFI used by the threepenny-gui library [1]. While the paper [2] is fairly clear, it seems that the documentation in System.Mem.Weak [3] differs in certain aspects. Could someone he

Re: [Haskell-cafe] Lenses: Should I declare Getters?

2013-09-10 Thread David Menendez
On Tue, Sep 10, 2013 at 1:31 AM, Charlie Paul wrote: > I've been looking through Edward Kmett's lens library, and I'm a bit > befuddled about Getters. In my own code, why would I want to have something > be a Getter instead of a plain function? As far as I can see, a plain > function is simpler t

[Haskell-cafe] GLFW not working in Cabal 1.18

2013-09-10 Thread Thiago Negri
The package GLFW is not building in Cabal 1.18. Setup.hs [1] depends on `rawSystemStdInOut` [2] that changed signature between 1.16 and 1.18. Is this considered a public API of Cabal? Cabal 1.16 rawSystemStdInOut :: Verbosity -> FilePath -> [String] -> Maybe (String, Bool) -> Bool -> IO (

Re: [Haskell-cafe] GHC API question: Getting access to cpp processed source

2013-09-10 Thread Henk-Jan van Tuyl
On Tue, 10 Sep 2013 22:03:16 +0200, AlanKim Zimmerman wrote: Is there an easy way to get access to the pre-processed source, without having to explicitly write it to an output file in a temporary location? You can run cpp with function readProcess, as done in function readHeaderFile in h

Re: [Haskell-cafe] Reasoning about performance

2013-09-10 Thread Scott Pakin
On 09/03/2013 06:09 PM, Dan Burton wrote: Here's a fun alternative for you to benchmark, using an old trick. I kind of doubt that this one will optimize as nicely as the others, but I am by no means an optimization guru: allPairsS :: [a] -> [(a, a)] allPairsS xs = go xs [] where go [] = id

[Haskell-cafe] Transforming AST parametrized with type

2013-09-10 Thread Sergey Mironov
Hi. Pat asked a question [1] about AST parametrized with types. People suggest to use Functor machinery if possible. Have anything changed since them? Do we have a way to safely transform the tree like data Expr a = Id { id :: Id a } | Op { op :: Char, expra :: (Expr a) , exprb :: (Expr a) } data

Re: [Haskell-cafe] GHC API question: Getting access to cpp processed source

2013-09-10 Thread Henk-Jan van Tuyl
On Wed, 11 Sep 2013 00:54:07 +0200, Henk-Jan van Tuyl wrote: Another option could be the cpphs package; the documentation has disappeared from haskell.org, but can be found in the Web Archive[0]. I just found the latest documentation at http://code.haskell.org/cpphs/docs/ Regards, Henk-Ja

[Haskell-cafe] GHC API question: Getting access to cpp processed source

2013-09-10 Thread AlanKim Zimmerman
Hi Cafe I have just discovered that GHC.getTokenStream fails if it is used on a module with CPP directives in it. This is reported in http://ghc.haskell.org/trac/ghc/ticket/8265 Is there an easy way to get access to the pre-processed source, without having to explicitly write it to an output fil

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Artyom Kazak
This might do for businesses, but clearly not adequate if we want Haskell/Cucumber (ever) to be suitable for use in government. Here I’d like to suggest a more rigorous approach, which hopefully will be considered for implementation instead of the original proposal.

Re: [Haskell-cafe] Lenses: Should I declare Getters?

2013-09-10 Thread Oliver Charles
On 09/10/2013 06:31 AM, Charlie Paul wrote: > I've been looking through Edward Kmett's lens library, and I'm a bit > befuddled about Getters. In my own code, why would I want to have > something be a Getter instead of a plain function? As far as I can see, > a plain function is simpler to use, and

Re: [Haskell-cafe] GLFW not working in Cabal 1.18

2013-09-10 Thread Carter Schonwald
the work around i did for cabal 1.18 compatibility for llvm-base can be found here: https://github.com/bos/llvm/blob/master/base/Setup.hs#L116-L144 this used the fact that cabal exposes the cabal version as a library value to generate a correct wrapper for either API version alternatively, you ca

Re: [Haskell-cafe] GHC API question: Getting access to cpp processed source

2013-09-10 Thread AlanKim Zimmerman
Thanks for the reference, but GHC already invokes the CPP. I think I am going to have to invoke a load of the module with ghc flags set to keep the output of the CPP phase, and then re-invoke it on that output to get the tokens. My question is more whether this CPP output can be kept in the GHC s