Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-08 Thread Simon Marlow
On 08/02/2012 02:26, John Meacham wrote: On Tue, Feb 7, 2012 at 4:24 AM, Simon Marlowmarlo...@gmail.com wrote: Separately the unix package added support for undecoded FilePaths (RawFilePath), but unfortunately at the same time we started using a new extension in GHC 7.4.1 (CApiFFI), which we

Re: [Haskell-cafe] network-2.3.0.10 compiled for ghc 7.4.1 windows

2012-02-08 Thread Holger Reinhardt
Did you run cabal clean before rebuilding with Git Bash? And can you post the exact runtime error you get? 2012/2/8 Alberto G. Corona agocor...@gmail.com I switched to Git bash and the runtime error produced by the library is the same. This error may be produced because the configuration it

Re: [Haskell-cafe] The State of Testing?

2012-02-08 Thread Christoph Breitkopf
Hello Thomas, On Wed, Feb 8, 2012 at 4:03 AM, Thomas Tuegel ttue...@gmail.com wrote: First, as author of the test suite code, let me apologize for the terrible documentation. This is absolutely NOT how coverage reports are supposed to work. If you configure with '--enable-tests

Re: [Haskell-cafe] network-2.3.0.10 compiled for ghc 7.4.1 windows

2012-02-08 Thread Alberto G. Corona
yes i did it,. the error is as follows: shop.exe: NetworkSocket.hsc:(948,3)-(1007,23): Non-exhaustive patterns in case I will download network form hackage and will do it form the beginning. . 2012/2/8 Holger Reinhardt hreinha...@gmail.com: Did you run cabal clean before rebuilding with Git

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Steve Horne
On 07/02/2012 22:56, Richard O'Keefe wrote: On 8/02/2012, at 2:11 AM, Steve Horne wrote: To be fair, field OF record isn't bad in that sense. However, it would defeat the purpose of TDNR - the record isn't first, and therefore cannot be used (given a left-to-right typing direction) as a

Re: [Haskell-cafe] The State of Testing?

2012-02-08 Thread Michael Craig
Thanks Thomas, that new flag is great. Mike Craig On Tue, Feb 7, 2012 at 10:03 PM, Thomas Tuegel ttue...@gmail.com wrote: On Tue, Feb 7, 2012 at 3:23 PM, Austin Seipp mad@gmail.com wrote: If you're writing a library, you need to compile the library with `-fhpc`, i.e. put it in the

[Haskell-cafe] Yesod and dependencies hell

2012-02-08 Thread Никита Тимофеев
For three days I can't compile dependencies for my project using yesod, yesod-auth, yesod-persistent, persistent-template, persistent-sqlite, persistent. When I varied version I received a variety of broken dependencies: persistent (0.6.* vs 0.7.*), conduit (0.1.* vs 0.2.*), conduit-pool,

[Haskell-cafe] Concurrency strategy for 2 threads and rare events

2012-02-08 Thread JP Moresmau
Hello, I'm wondering what's the best strategy to use in the following scenario: - 2 threads - One perform some work that will take time, possibly go on forever - Another waits for user input (like commands from the keyboard) that affects thread 1 (causing it to stop, in the simplest case)

Re: [Haskell-cafe] Concurrency strategy for 2 threads and rare events

2012-02-08 Thread Erik Hesselink
You could use throwTo to raise an exception in the thread you want to stop. Otherwise, having some variable (IORef, TVar, MVar) that the long running thread occasionally checks seems like a good solution. Erik On Wed, Feb 8, 2012 at 17:04, JP Moresmau jpmores...@gmail.com wrote: Hello, I'm

Re: [Haskell-cafe] Concurrency strategy for 2 threads and rare events

2012-02-08 Thread Yves Parès
Why do you think it's a lot? MVar are a teeny tiny and convenient primitive of communication, and I don't see why they wouldn't suit your need. Sure a throwTo would do the trick... But they're is do the trick and do the job, you see? Using STM and TVars *would* be kind of overkill. 2012/2/8 JP

Re: [Haskell-cafe] network-2.3.0.10 compiled for ghc 7.4.1 windows

2012-02-08 Thread Holger Reinhardt
Having discussed the issue privately with Alberto, I've found another bug and updated my pull request [1]. Using that code it should be possible to build the network library on Windows using MSys on GHC 7.4.1. [1] https://github.com/haskell/network/pull/25 2012/2/8 Alberto G. Corona

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-08 Thread Ian Lynagh
On Tue, Feb 07, 2012 at 06:26:48PM -0800, John Meacham wrote: Hi, from my reading, it looks like 'capi' means from a logical perspective, Don't assume the object is addressible, but rather that the standard c syntax for calling this routine will expand into correct code when compiled with

Re: [Haskell-cafe] network-2.3.0.10 compiled for ghc 7.4.1 windows

2012-02-08 Thread Johan Tibell
I will merge this as soon as I get back from vacation. On Feb 8, 2012 8:54 AM, Holger Reinhardt hreinha...@gmail.com wrote: Having discussed the issue privately with Alberto, I've found another bug and updated my pull request [1]. Using that code it should be possible to build the network

Re: [Haskell-cafe] Concurrency strategy for 2 threads and rare events

2012-02-08 Thread JP Moresmau
No, I meant they seem to be mainly for the use case where the reading thread blocks for more input, and maybe there's a simpler/more efficient way to quickly check if an event has occurred, that's all. If there isn't then a MVar it will be. JP On Wed, Feb 8, 2012 at 7:35 PM, Yves Parès

Re: [Haskell-cafe] Concurrency strategy for 2 threads and rare events

2012-02-08 Thread Edward Amsden
If you only need one structure for communication (e.g. neither thread needs to lock multiple things) you might consider using an IORef, and writing/polling it with atomicModifyIORef. It's cheaper than an MVar for the case where you don't need to lock multiple threads. On Wed, Feb 8, 2012 at 2:45

[Haskell-cafe] Mersenne-random and standard random API

2012-02-08 Thread Yves Parès
Hi, I've been in the past told that mersenne-random was much better than the standard random package. However, System.Random.Mersenne doesn't follow the general API described in System.Random, MTGen is not an instance of RandomGen. But a sample on System.Random.Mersenne.getStdRandom documentation

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Malcolm Wallace
On 8/02/2012, at 14:16, Steve Horne sh006d3...@blueyonder.co.uk wrote: I haven't given a lot of thought to updates. I very much fail to see the point of replacing prefix function application with postfix dots, merely for field selection. There are already some imperfect, but adequate,

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Richard O'Keefe
On 9/02/2012, at 3:16 AM, Steve Horne wrote: On 07/02/2012 22:56, Richard O'Keefe wrote: On 8/02/2012, at 2:11 AM, Steve Horne wrote: To be fair, field OF record isn't bad in that sense. However, it would defeat the purpose of TDNR - the record isn't first, and therefore cannot be

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread David Thomas
record.field (read record, oops, I only want part of it.) I would read this record's field ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Evan Laforge
On Wed, Feb 8, 2012 at 2:47 PM, Malcolm Wallace malcolm.wall...@me.com wrote: On 8/02/2012, at 14:16, Steve Horne sh006d3...@blueyonder.co.uk wrote: I haven't given a lot of thought to updates. I very much fail to see the point of replacing prefix function application with postfix dots,

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Evan Laforge
How about § then?  Surely at this late date we can allow ourselves *one* non-ASCII character? The very name of it (*section* sign) suggests taking a part; and if you are totally in love with dot, think of it as a dot with ponytails. I suggest record的field, or record之field for the more

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Richard O'Keefe
On 9/02/2012, at 1:26 PM, Evan Laforge wrote: How about § then? Surely at this late date we can allow ourselves *one* non-ASCII character? The very name of it (*section* sign) suggests taking a part; and if you are totally in love with dot, think of it as a dot with ponytails. I

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Anthony Clayden
I chose the most available non-ASCII character I could find. Set the criterion to be present in most ISO 8-bit character sets and there are really only two candidates, section sign and degrees sign. ... Brilliant! We'll use degrees sign for function composition (so that it follows the

[Haskell-cafe] Haskell Weekly News: Issue 214

2012-02-08 Thread Daniel Santa Cruz
Welcome to issue 214 the HWN, a newsletter covering stories, questions, and remarks seen around the web during the week of January 29 to February 4, 2012. You can find the HTML version at: http://contemplatecode.blogspot.com/2012/02/haskell-weekly-news-issue-214.html Quotes of the Week *

Re: [Haskell-cafe] Yesod and dependencies hell

2012-02-08 Thread Michael Snoyman
Are you talking about starting a new site, or running an existing site? For a new site, it's probably a good idea to wait until 0.10 comes out, as it includes a lot of nice enhancements, and we'll be releasing it this week. If an existing site, you probably need to have more strict upper bounds on

[Haskell-cafe] Is ListT a valid MonadPlus?

2012-02-08 Thread Richard Wallace
It appears to me that the MonadPlus instance for ListT breaks the following MonadPlus law m mzero = mzero I've tried with every implementation of ListT I could find - the one in mtl, transformers, List, even ListT done right and it's alternative. They all seem to violate the above law.