Re: bundled libraries in ghc

2013-09-04 Thread Jens Petersen
On 3 September 2013 23:11, Stephen Paul Weber singpol...@singpolyma.netwrote: Somebody claiming to be Jens Petersen wrote: The libraries in question here are haskeline, terminfo, and xhtml. Are those libraries needed by GHCI? libdir/bin/ghc is linked to haskeline and terminfo. ghc-pkg is

RE: Question about correct GHC-API use for type checking (or zonking, or tidying)

2013-09-04 Thread Simon Peyton-Jones
The id you are getting is a monomorphic id, with a type like a-a, not the polymorphic forall a. a-a. You don't want to go round arbitrarily creating a new Id with the same unique but a different type. I have no idea what would happen then. It's hard for me to understand just what you code is

[Haskell] AVICPS 2013: Call for Papers. Submission deadline Sep 23, 2013

2013-09-04 Thread CAV 2012 CFP
-- AVICPS 2013 The 4th Analytic Virtual Integration of Cyber-Physical Systems Workshop http://www.analyticintegration.org/ Vancouver, Canada,

[Haskell] ANN: set-cover solves Sudoku, Soma cube, 8 Queens etc.

2013-09-04 Thread Henning Thielemann
I have prepared the package set-cover for solving exact set cover problems. It includes example programs for solving Sudoku, 8 Queens, Soma Cube, Tetris Cube, Cube of L's, and Logika's Baumeister puzzle. Please refer to these examples for learning how the library works. The solver is

[Haskell] ANN: Cabal v1.18.0 released

2013-09-04 Thread Johan Tibell
Hi all, On behalf of the cabal maintainers and contributors I'm proud to announce the Cabal (and cabal-install) 1.18.0 release. To install run cabal update cabal install Cabal-1.18.0 cabal-install-1.18.0 With 854 commits since the last release there are two many improvements and bug fixes

Re: [Haskell-cafe] Fwd: Can I use String without in ghci?

2013-09-04 Thread Richard A. O'Keefe
On 3/09/2013, at 10:44 PM, Rustom Mody wrote: Whoops! my bad -- I was *thinking* 'pipes' but ended up *writing* 'IPC' :-) So let me restate more explicitly what I intended -- pipes, FIFOs, sockets, etc. IOW read/write/send/recv calls and the mathematical model represented by the

Re: [Haskell-cafe] Haskell / Functional Programmers Group in Madrid (Spain)?

2013-09-04 Thread Eduardo Basterrechea
Alejandro Serrano Mena trupill at gmail.com writes: Hi,Is there any Haskell or functional programmers user group in the region of Madrid? If not, I think it could be a great idea to get to know each other, and share experiences. Furthermore, we could try to organize some meetings with

Re: [Haskell-cafe] Haskell / Functional Programmers Group in Madrid (Spain)?

2013-09-04 Thread Alberto G. Corona
There is one Functional Programming meetup in Madrid. The first meeting was in August. The next meeting is the 11th September (this month) . I couldn't assist in September. I hope to see you in October!. http://www.meetup.com/FP-Madrid/ 2013/9/4 Eduardo Basterrechea eba...@molinodeideas.es

[Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Alejandro Serrano Mena
Hi, I'm currently writing a tutorial on web applications using Haskell. I know the pros and cons of each server-side library (Yesod, Snap, Scotty, Warp, Happstack), but I'm looking for the right choice for client-side programming that converts Haskell to JavaScript. I've finally come to Fay vs.

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Niklas Hambüchen
Hi, I'm also interested in that. Have you already evaluated haste? It does not seem to have any of your cons, but maybe others. What I particularly miss from all solutions is the ability to simply call parts written in Haskell from Javascript, e.g. to write `fib` and then integrate it into an

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Alejandro Serrano Mena
I haven't looked at Haste too much, I'll give it a try. My main problem is that I would like to find a solution that will continue working in years (somehow, that will became the solution for generating JS from Haskell code). That's why I see GHCJS (which just includes some patches to mainstream

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Nathan Hüsken
In my opinion haste is somewhere between Fay and ghcjs. It supports more than Fay, but in difference to ghcjs some PrimOps are not supported (weak pointers for example). It is a little bit more direct than ghcjs, in the sense that it does not need such a big rts written in js. I like haste

[Haskell-cafe] Efficient matrix multiply using accelerate

2013-09-04 Thread Morten Olsen Lysgaard
I've been trying to get some speed out of the accelerate library today. What I want to implement is something as simple as a matrix multiply. I'd like it to be fast and memory efficient. Given the equation C = AB where A is nxr B is rxm C is nxm it seem reasonable to allocate three arrays

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Adam Bergmark
You might be interested in these two comment threads (and maybe the rest of the comments as well): http://www.reddit.com/r/haskell/comments/1ldqav/thoughts_on_uhc_vs_haste_vs_fay/cbyrhwz

Re: [Haskell-cafe] Unexpected behaviour with send and send-buffer setting

2013-09-04 Thread Bryan O'Sullivan
On Tue, Sep 3, 2013 at 3:56 PM, Simon Yarde simonya...@me.com wrote: I'm new to Haskell and have reached an impasse in understanding the behaviour of sockets. Your question is actually not related to Haskell at all, but is a general I don't understand socket programming question. You're being

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Joachim Breitner
Hi, Am Mittwoch, den 04.09.2013, 14:46 +0200 schrieb Adam Bergmark: You might be interested in these two comment threads (and maybe the rest of the comments as well): http://www.reddit.com/r/haskell/comments/1ldqav/thoughts_on_uhc_vs_haste_vs_fay/cbyrhwz

Re: [Haskell-cafe] Reasoning about performance

2013-09-04 Thread Carter Schonwald
Awesome/ thanks for sharing. It's worth noting that criterion is also pretty great for microbenchmarks too. On my machine I get pretty good timing accuracy on anything that takes more than 20 nanoseconds. On Wednesday, September 4, 2013, Scott Pakin wrote: On 09/03/2013 06:02 PM, Carter

[Haskell-cafe] How to read a file and return a String?

2013-09-04 Thread yi lu
I want to read a text file, and store it in a *String*. But readFile will get *IO String*. I search with google and they tell me it is not necessarily to do so. Can you explain to me why is this? Furthermore, How to read a file and store it in a String? In fact, I want to read a file and split it

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Daniil Frumin
Hi! On Sep 4, 2013, at 13:02, Niklas Hambüchen m...@nh2.me wrote: Hi, I'm also interested in that. Have you already evaluated haste? It does not seem to have any of your cons, but maybe others. What I particularly miss from all solutions is the ability to simply call parts written in

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Adam Bergmark
Here are some points I'd like to emphasize in addition to the threads above, with the disclaimer that I'm the maintainer of Fay. Fay tries to be very simple, the code base is small (~4800 LoC). This really lowers the entry barrier for contributions which I think is very important for open source

Re: [Haskell-cafe] How to read a file and return a String?

2013-09-04 Thread Brandon Allbery
On Wed, Sep 4, 2013 at 10:21 AM, yi lu zhiwudazhanjiang...@gmail.comwrote: I want to read a text file, and store it in a *String*. But readFile will get *IO String*. I search with google and they tell me it is not necessarily to do so. Can you explain to me why is this? Furthermore, How to

[Haskell-cafe] Strange IO sequence behaviour (Was: sequence causing stack overflow on pretty small lists)

2013-09-04 Thread Tom Ellis
As an addendum to the recent discussion, can anyone explain why main crashes quickly with a stack overflow, whereas main' is happy to print Hi for ages (eventually crashing due to an out of memory condition)? bignum = 100 * 1000 * 1000 main = replicateM bignum (return ()) main' =

Re: [Haskell-cafe] How to read a file and return a String?

2013-09-04 Thread Tom Ellis
On Wed, Sep 04, 2013 at 10:21:37PM +0800, yi lu wrote: I want to read a text file, and store it in a *String*. But readFile will get *IO String*. I search with google and they tell me it is not necessarily to do so. Can you explain to me why is this? Furthermore, How to read a file and store

Re: [Haskell-cafe] Reasoning about performance

2013-09-04 Thread Scott Pakin
On 09/03/2013 06:02 PM, Carter Schonwald wrote: It's also worth adding that ghci does a lot less optimization than ghc. Yes, I discovered that before I posted. Note from my initial message that I used ghc to compile, then loaded the compiled module into ghci: Prelude :!ghc -c -O2

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Luite Stegeman
On Wed, Sep 4, 2013 at 6:32 PM, Daniil Frumin difru...@gmail.com wrote: I think it's nice that you've raised that question, I will think about implementing a finer API for calling Haskell from JS. It sounds like something like h$runSyncWithResult (name open for bikeshedding) that takes an

[Haskell-cafe] ANNOUNCE: Haskell Refactorer (HaRe) version 0.7.0.0

2013-09-04 Thread AlanKim Zimmerman
I am please to announce an alpha release of the Haskell Refactorer making use of the GHC API. It is a work in progress, but currently supports the following refactorings iftocase Convert an if expression to a case expression dupdef Duplicate a definition

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Chris Smith
I second the recommendation to look at Haste. It's what I would pick for a project like this today. In the big picture, Haste and GHCJS are fairly similar. But when it comes to the ugly details of the runtime system, GHCJS adopts the perspective that it's basically an emulator, where

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Adam Bergmark
Niklas: I missed your note about calling Haskell from JS, see this for Fay: https://github.com/faylang/fay/wiki/Fay-Status-Update-September-2013%3A-ZuriHac%2C-typeclasses%2C-haskell-suite%2C-and-strictness-wrappers#javascript-fay-communication On Wed, Sep 4, 2013 at 8:18 PM, Luite Stegeman

Re: [Haskell-cafe] Strange IO sequence behaviour (Was: sequence causing stack overflow on pretty small lists)

2013-09-04 Thread Joe Q
To give a very casual explanation, both mains are of the form do this a bunch of times and return the results. Your first is do nothing and return the ()s, but importantly, it has to execute all those nothings. Your second is print hello a bunch and return the ()s. The list it wants to eventually

Re: [Haskell-cafe] Strange IO sequence behaviour (Was: sequence causing stack overflow on pretty small lists)

2013-09-04 Thread Joe Q
Er, I seem to have misread and thought you were doing infinite replicateM, so that explanation doesn't completely address your question. That's what I get for reading on a phone! On Sep 4, 2013 4:11 PM, Joe Q headprogrammingc...@gmail.com wrote: To give a very casual explanation, both mains are

[Haskell-cafe] ANN: Cabal v1.18.0 released

2013-09-04 Thread Johan Tibell
Hi all, On behalf of the cabal maintainers and contributors I'm proud to announce the Cabal (and cabal-install) 1.18.0 release. To install run cabal update cabal install Cabal-1.18.0 cabal-install-1.18.0 With 854 commits since the last release there are two many improvements and bug fixes

Re: [Haskell-cafe] ANN: Cabal v1.18.0 released

2013-09-04 Thread Darren Grant
Thank you all for the hard work. The new features are already of great help to me! Cheers, Darren On 2013-09-04 2:13 PM, Johan Tibell johan.tib...@gmail.com wrote: Hi all, On behalf of the cabal maintainers and contributors I'm proud to announce the Cabal (and cabal-install) 1.18.0 release.

Re: [Haskell-cafe] ANN: Cabal v1.18.0 released

2013-09-04 Thread Yuri de Wit
Thanks for all the hard work! If you see this in OSX (#1009) while installing cabal 1.18: *Warning: could not create a symlink in /Users/lemao/Library/Haskell/bin for * *cabal because the file exists there already but is not managed by cabal. You* *can create a symlink for this executable

Re: [Haskell-cafe] type constructor section for (- Bool), _not_ ((-) Bool)

2013-09-04 Thread AntC
Brent Yorgey byorgey at seas.upenn.edu writes: On Tue, Sep 03, 2013 at 11:33:46AM +, AntC wrote: I want an instance and type improvement constraint of the form instance (f ~ (- Bool)) = C Foo (f b) where ... There is no operator section syntax for types. Moreover,

Re: [Haskell-cafe] Reasoning about performance

2013-09-04 Thread Scott Pakin
On 09/03/2013 05:43 PM, Bob Ippolito wrote: Haskell's non-strict evaluation can often lead to unexpected results when doing tail recursion if you're used to strict functional programming languages. In order to get the desired behavior you will need to force the accumulator (with something

Re: [Haskell-cafe] Efficient matrix multiply using accelerate

2013-09-04 Thread Trevor L. McDonell
Hi Morten, On 04/09/2013, at 9:53 PM, Morten Olsen Lysgaard mor...@lysgaard.no wrote: I've been trying to get some speed out of the accelerate library today. What I want to implement is something as simple as a matrix multiply. I'd like it to be fast and memory efficient. Well, the trouble

Re: [Haskell-cafe] How to read a file and return a String?

2013-09-04 Thread Richard A. O'Keefe
The original poster wants to - read a file - get the contents as a String - break the string into lines - do something with the lines - and presumably print the result Easy. Put the following lines in a file called 'rf.hs': file_name = rf.hs main = readFile file_name = \string -

Re: [arch-haskell] New [haskell-happstack] repository

2013-09-04 Thread Nicola Squartini
Done. On Mon, Sep 2, 2013 at 6:35 PM, Ramana Kumar ram...@member.fsf.org wrote: It would be wonderful if you could update the wiki to mention the new repository. https://wiki.archlinux.org/index.php/Haskell_package_guidelines On Fri, Aug 23, 2013 at 5:47 PM, Nicola Squartini