Re: [Haskell-cafe] Data.ByteString.Lazy.ByteString vs Data.ByteString.Lazy.Internal.ByteString

2011-03-11 Thread C K Kashyap
Hi Don, What would be a good way to figure out the usage of ByteString - particularly the PS constructor. Regards, Kashyap On Fri, Feb 11, 2011 at 10:01 AM, C K Kashyap ckkash...@gmail.com wrote: Yep, the 'Internal' module is where the type is defined, and then re-exported through the regular

Re: [Haskell-cafe] possible bug for ghc 7 + xcode 4 on snow leopard?

2011-03-11 Thread steffen
ok, now I've installed XCode 4 and run into the very same problems. As already said, XCode 4 targets snow leopard only. That's why the MacOSX10.5.sdk is missing. unfortunately the ghc packages for snow leopard are configured to support leopard still. See:

Re: [Haskell-cafe] possible bug for ghc 7 + xcode 4 on snow leopard?

2011-03-11 Thread Jurriën Stutterheim
There is no guarantee that /Developer-old/ is still on the system, so depending on it for symlinking is probably not a good idea. So far I have had no problems symlinking /Developer/SDKs/MacOSX10.6.sdk to /Developer/SDKs/MacOSX10.5.sdk. This could be one alternative. However, separate Snow

Re: [Haskell-cafe] Convert a function to a string of operators?

2011-03-11 Thread Erik Hesselink
On Thu, Mar 10, 2011 at 13:34, Lyndon Maydwell maydw...@gmail.com wrote: Will methods explained here work for boolean expressions? The convenience of defining using specialised datatypes for serialising numeric operations comes from Num being a typeclass. This is not the case for Bool:

Re: [Haskell-cafe] ContT and ST stack

2011-03-11 Thread Max Bolingbroke
On 10 March 2011 17:55, Bas van Dijk v.dijk@gmail.com wrote: On 10 March 2011 18:24, Yves Parès limestr...@gmail.com wrote: Why has the operator (.) troubles with a type like (forall s. ST s a)? Why can't it match the type 'b' in (.) definition? As explained by the email from SPJ that I

Re: [Haskell-cafe] ContT and ST stack

2011-03-11 Thread Edward Z. Yang
Excerpts from Max Bolingbroke's message of Fri Mar 11 05:15:34 -0500 2011: AFAIK this decision was reversed because SPJ found a simple way to support them. Indeed, they work fine in 7.0.2 and generate warnings. Correct. About a week-ish ago I submitted a patch to update the docs. Cheers,

Re: [Haskell-cafe] ContT and ST stack

2011-03-11 Thread Bas van Dijk
On 11 March 2011 11:15, Max Bolingbroke batterseapo...@hotmail.com wrote: On 10 March 2011 17:55, Bas van Dijk v.dijk@gmail.com wrote: On 10 March 2011 18:24, Yves Parès limestr...@gmail.com wrote: Why has the operator (.) troubles with a type like (forall s. ST s a)? Why can't it match

Re: [Haskell-cafe] ContT and ST stack

2011-03-11 Thread Bas van Dijk
On 11 March 2011 12:04, Bas van Dijk v.dijk@gmail.com wrote: Unfortunately foo still doesn't type check in 7.0.2: foo :: (forall s. ST s a) - a foo st = ($) runST st Note that the following does type check with ImpredicativeTypes: bar = id runST Bas

Re: [Haskell-cafe] Data.ByteString.Lazy.ByteString vs Data.ByteString.Lazy.Internal.ByteString

2011-03-11 Thread Brandon Moore
It is a goal of the ByteString library that you should almost never need to work directly with the PS constructor and the things used in that definition. If you find some task involving IO or string manipulation that seems to require using the internal operations, it's probably worth bringing it

[Haskell-cafe] Some quick experiments with GHC 7.0.2 in Intel's Manycore Testing Lab (32 cores)

2011-03-11 Thread José Pedro Magalhães
Hi all, I've played a bit with Intel's Manycore Testing Lab ( http://software.intel.com/en-us/articles/intel-many-core-testing-lab/). Part of the agreement to use it requires that you report back your experiences, which I did in an Intel forum post (

Re: [Haskell-cafe] possible bug for ghc 7 + xcode 4 on snow leopard?

2011-03-11 Thread Mark Lentczner
I don't have Xcode4 (yet), but I'd be very surprised if Apple created an environment that cut off development for older releases. In the past, the SDKs for some older releases have been an optional part of the install. That is, you've had to go to the customize installation screen and explicitly

[Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Díaz
Hi, cafe, I'm working in a program where I use many connections with Network.HTTP. Sometimes, connections are closed while my program is reading them, and an error appears: socket: XXX: Data.ByteString.hGetLine: invalid argument (Bad file descriptor) All I need is to handle this error. The

Re: [Haskell-cafe] Help with how to concatenate with own datatypes

2011-03-11 Thread eldavido
Yeah, that works! Thanks! -- View this message in context: http://haskell.1045720.n5.nabble.com/Help-with-how-to-concatenate-with-own-datatypes-tp3424433p3425325.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Fischer
On Friday 11 March 2011 17:04:16, Daniel Díaz wrote: Hi, cafe, I'm working in a program where I use many connections with Network.HTTP. Sometimes, connections are closed while my program is reading them, and an error appears: socket: XXX: Data.ByteString.hGetLine: invalid argument (Bad

Re: [Haskell-cafe] possible bug for ghc 7 + xcode 4 on snow leopard?

2011-03-11 Thread Carter Schonwald
the latest xcode installer has no customization dialogues. On Fri, Mar 11, 2011 at 9:46 AM, Mark Lentczner mark.lentcz...@gmail.comwrote: I don't have Xcode4 (yet), but I'd be very surprised if Apple created an environment that cut off development for older releases. In the past, the SDKs

Re: [Haskell-cafe] possible bug for ghc 7 + xcode 4 on snow leopard?

2011-03-11 Thread Carter Schonwald
fyi all: the relevant GHC ticket has already been done and the difference in how to build the ghc pkg has been identified. On Fri, Mar 11, 2011 at 11:39 AM, Carter Schonwald carter.schonw...@gmail.com wrote: the latest xcode installer has no customization dialogues. On Fri, Mar 11, 2011 at

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Henning Thielemann
On Fri, 11 Mar 2011, Daniel Fischer wrote: On Friday 11 March 2011 17:04:16, Daniel Díaz wrote: Hi, cafe, I'm working in a program where I use many connections with Network.HTTP. Sometimes, connections are closed while my program is reading them, and an error appears: socket: XXX:

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Peebles
Check out the spoon package on hackage. It's designed for these kinds of situations, and will wrap up common user-generated pure exceptions into a Maybe (and will return Nothing in the cases you describe) -Dan On Fri, Mar 11, 2011 at 11:04 AM, Daniel Díaz danield...@asofilak.eswrote: Hi, cafe,

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Henning Thielemann
On Fri, 11 Mar 2011, Daniel Peebles wrote: Check out the spoon package on hackage. It's designed for these kinds of situations, and will wrap up common user-generated pure exceptions into a Maybe (and will return Nothing in the cases you describe) This is a hack, since 'undefined' cannot

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Peebles
It's a hack by design, to work around libraries that do the wrong thing. On Fri, Mar 11, 2011 at 4:07 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Fri, 11 Mar 2011, Daniel Peebles wrote: Check out the spoon package on hackage. It's designed for these kinds of situations,

[Haskell-cafe] Need help to solve this question

2011-03-11 Thread Chatura Roche
Both sections relate to the case study: Index for a document of text. SECTION A: Given the attached Haskell code which produces an index of words, make the following alterations by modifying existing functions and including new functions where necessary : 3) Treat a capitalised word (one or

Re: [Haskell-cafe] Need help to solve this question

2011-03-11 Thread Brent Yorgey
http://www.haskell.org/haskellwiki/Homework_help On Fri, Mar 11, 2011 at 09:26:59PM +, Chatura Roche wrote: Both sections relate to the case study: Index for a document of text. SECTION A: Given the attached Haskell code which produces an index of words, make the following alterations

[Haskell-cafe] Light and fast http server

2011-03-11 Thread Victor Oliveira
Hi cafe, There are a lot of http servers in hackage. I didn't have used none. I would like to know if one of them is something closer of the nginx. I need some light and fast. It don't need support all http, just the basics is fine. Suggestions? []s Victor

Re: [Haskell-cafe] Light and fast http server

2011-03-11 Thread Vo Minh Thu
2011/3/11 Victor Oliveira rhapso...@gmail.com: Hi cafe, There are a lot of http servers in hackage. I didn't have used none. I would like to know if one of them is something closer of the nginx. I need some light and fast. It don't need support all http, just the basics is fine.

[Haskell-cafe] Flexible Wrappers - an Introduction

2011-03-11 Thread Iain Alexander
There are three flexible wrappers provided in the initial flexiwrap package [1]. (More may be required in the future.) short longwraps FW FlexiWrap values FWT FlexiWrapT unary type constructors FWCTC FlexiWrapCTCbinary operators which

[Haskell-cafe] Reference monad

2011-03-11 Thread Joshua Ball
Hi, Suppose I want the following functions: newRef :: a - RefMonad (Ref a) readRef :: Ref a - RefMonad a writeRef :: Ref a - a - RefMonad () for some appropriate data Ref = ... Obviously these functions are already satisfied by IORefs and STM. But if I wanted to implement my own (for fun)...

Re: [Haskell-cafe] Reference monad

2011-03-11 Thread Luke Palmer
On Fri, Mar 11, 2011 at 8:18 PM, Joshua Ball scioli...@gmail.com wrote: Suppose I want the following functions: newRef :: a - RefMonad (Ref a) readRef :: Ref a - RefMonad a writeRef :: Ref a - a - RefMonad () Assuming this is a pure interface, you need one more thing: runRefMonad ::

Re: [Haskell-cafe] Light and fast http server

2011-03-11 Thread Don Stewart
snap or warp/yesod. maybe in a few years we will have a winner for the platform... --dons On Friday, March 11, 2011, Vo Minh Thu not...@gmail.com wrote: 2011/3/11 Victor Oliveira rhapso...@gmail.com: Hi cafe, There are a lot of http servers in hackage. I didn't have used none. I would like

Re: [Haskell-cafe] Reference monad

2011-03-11 Thread Levent Erkok
On Mar 11, 2011, at 7:37 PM, Luke Palmer wrote: On Fri, Mar 11, 2011 at 8:18 PM, Joshua Ball scioli...@gmail.com wrote: Suppose I want the following functions: newRef :: a - RefMonad (Ref a) readRef :: Ref a - RefMonad a writeRef :: Ref a - a - RefMonad () I would be delighted to see a

Re: [Haskell-cafe] [Haskell] Linker flags for foreign export.

2011-03-11 Thread Jason Dusek
I now have it working for static-static on Linux; but not with dynamic anything yet. Thanks for all your help. -- Jason Dusek ()  ascii ribbon campaign - against html e-mail /\  www.asciiribbon.org   - against proprietary attachments ___