On Tue, Nov 17, 2009 at 1:18 PM, Simon Peyton-Jones
simo...@microsoft.com wrote:
| What's the status of the TDNR proposal [1]? Personally I think it is a
| very good idea and I'd like to see it in Haskell'/GHC rather sooner
| than later. Working around the limitations of the current record
|
On Tue, Nov 17, 2009 at 1:18 PM, Simon Peyton-Jones
simo...@microsoft.com wrote:
I've added an informal straw poll to the bottom of [1] to allow you to
express an opinion.
Forgive my ignorance, but I can not find a way to edit the wiki page.
What am I doing wrong?
Cheers,
Levi
What's the status of the TDNR proposal [1]? Personally I think it is a
very good idea and I'd like to see it in Haskell'/GHC rather sooner
than later. Working around the limitations of the current record
system is one of my biggest pain points in Haskell and TDNR would be a
major improvement. Thus
Hi all,
I try to create a simple monad using a stack of Reader and IO but when
using it, I encounter some problems. The Monad is defined as M a:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Main where
import Control.Monad.Reader
import Control.Concurrent
newtype M a = M {
unM ::
Hi Jeremy,
On Sun, Aug 23, 2009 at 5:08 PM, Jeremy Shawjer...@n-heptane.com wrote:
What you probably want is:
test2' :: IO ()
test2' = runM foo $ do
loop callback
liftIO $ print here
This equals my test1 version which is fine without forkIO.
return $ loop callback :: (Monad m) = IO
On Sun, Aug 23, 2009 at 5:21 PM, Jeremy Shawjer...@n-heptane.com wrote:
Also, you could define a forkM function like this:
forkM :: M () - M ThreadId
forkM (M r) = M $ mapReaderT forkIO r
which could be used like this:
test = runM foo $ do
forkM $ loop callback
liftIO $
On Fri, Aug 14, 2009 at 11:45 PM, Simon Marlowmarlo...@gmail.com wrote:
You should check for EINTR and restart the call as necessary. This is
standard best practice for POSIX programming anyway, and we do it for all
the calls that can return EINTR in the IO library and RTS.
[...]
Blocking
Hi Bulat,
On Fri, Aug 7, 2009 at 5:32 PM, Bulat
Ziganshinbulat.zigans...@gmail.com wrote:
Hello Levi,
Friday, August 7, 2009, 6:48:42 PM, you wrote:
1. How can one safely perform a blocking wait on a system call via
FFI when compiling with -threaded
i think you should use forkOS to
Apologies for re-posting this subject here since I had sent already a
message to haskell-café 3 days ago, but I just learned about this
mailing list and it seems more appropriate to ask this question here I
guess. I already got a reply from Simon Marlow but I posted some
further (so far
On Thu, Aug 6, 2009 at 12:17 PM, Simon Marlowmarlo...@gmail.com wrote:
The SIGVTALRM signal is delivered to one (random) thread in the program, so
I imagine it just isn't being delivered to the thread that runs your second
call to sleep. (the main Haskell thread is a bound thread and hence
is a bound thread and hence gets
an OS thread to itself).
Is there some reason you can't use threadDelay? threadDelay is much more
friendly: it doesn't require another OS thread for each sleeping Haskell
thread.
Cheers,
Simon
On 05/08/2009 17:01, Levi Greenspan wrote:
Nobody
Nobody?
On Tue, Aug 4, 2009 at 10:06 AM, Levi
Greenspangreenspan.l...@googlemail.com wrote:
Dear list members,
In February this year there was a posting Why does sleep not work?
(http://www.haskell.org/pipermail/haskell-cafe/2009-February/055400.html).
The problem was apparently caused by
Dear list members,
In February this year there was a posting Why does sleep not work?
(http://www.haskell.org/pipermail/haskell-cafe/2009-February/055400.html).
The problem was apparently caused by signal handler interruptions. I
noticed the same (not with sleep though) when doing some FFI work
On Sun, Jan 18, 2009 at 6:07 AM, Sigbjorn Finne
sigbjorn.fi...@gmail.com wrote:
Maybe. Handling the common cases reasonably well is
probably worth doing first (+profiling) before opting for
a heartlung transplant..
To wit, I've trivially improved the handling of string and
integer lits in
Sounds very good to me. However I would like to as one question
regarding the HTTP lib. On hackage I read: HTTP: A library for
client-side HTTP. Maybe you or someone on this list can tell me what
the restrictions of the HTTP library are that restrict it to client
side. What would be required to
On Fri, Jan 16, 2009 at 8:11 PM, Sigbjorn Finne
sigbjorn.fi...@gmail.com wrote:
I'm guessing that you are reading something different into that
than what's intended - it's client-side in the sense that it can
only issue web requests and handle their responses. i.e., it
doesn't handle incoming
Dear list members,
I started looking into monadic programming in Haskell and I have some
difficulties to come up with code that is concise, easy to read and
easy on the eyes. In particular I would like to have a function add
with following type signature: JSON a = MyData - String - a -
MyData.
On Fri, Jan 16, 2009 at 12:52 AM, Ryan Ingram ryani.s...@gmail.com wrote:
Here's a series of refactorings that I feel gets to the essence of the code.
Indeed it does.
Final result:
modifyJSON f m = m { json = f (json m) }
add m k v = modifyJSON go m where
go = showJSON . toJSObject .
Dear list members,
I tried Text.JSON from hackage and did an initial test to see how well
it performs. I created a single JSON file of roughly 6 MB containing a
single JSON array with 30906 JSON objects and used the following code
to parse it:
module Main where
import System.IO
import
Ticket #635 Replace use of select() in the I/O manager with
epoll/kqueue/etc. (http://hackage.haskell.org/trac/ghc/ticket/635)
dates back from 2005. Now its 2009 and GHC can handle hundreds of
thousands of threads, yet having more than 1024 file descriptors open
is still impossible. This
On Fri, 2008-07-25 at 13:45 -0700, Adam Langley wrote:
I'd suggest that you write your server on the select() based system
as-is for now. Then, when you need epoll you'll be sufficiently
motivated to hack up the RTS to include it ;)
The problem with a select() based approach is that I can not
PROTECTED] wrote:
2008/7/23 Levi Greenspan [EMAIL PROTECTED]:
I would be grateful for any advices, hints or comments. And I really
look forward to the FFI section in the Real World Haskell book.
Generally it looks pretty good. I think I'm missing some C code
(function wrapper). However, libevent
Thank you (and Christopher) for the link. I have one question though -
I read this ticket in the GHC trac:
http://hackage.haskell.org/trac/ghc/ticket/635 which plans to use
epoll instead of select. The reason I thought of libevent is exactly
the support for epoll and other better-than-select
Dear list members,
This is my first attempt to create a FFI to libevent
(http://monkey.org/~provos/libevent/) which is an event notification
library. A simple usage example is for instance given here:
http://unx.ca/log/libevent_echosrv1c/ . In C one basically creates
struct event instances which
24 matches
Mail list logo