Re: [Haskell-cafe] Fwd: GHC as a library error.

2011-10-18 Thread JP Moresmau
The release notes say: The type of defaultErrorHandler has changed. In particular, this means that you will normally want to pass it defaultLogAction instead of defaultDynFlags. (http://www.haskell.org/ghc/docs/7.2.1/html/users_guide/release-7-2-1.html). defaultLogAction is in the DynFlags module,

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-18 Thread Vincent Hanquez
On 10/18/2011 01:30 AM, Conrad Parker wrote: And I often work with mixed text/binary data (eg. text annotations in video streams). I'd want the Show/Read instances to be in the form of a hexdump with char representation alongside (like xxd or od -xc output). It roundtrips well, so why not? :-)

Re: [Haskell-cafe] About the ConstraintKinds extension

2011-10-18 Thread Max Bolingbroke
On 18 October 2011 02:17, bob zhang bobzhang1...@gmail.com wrote:      But I found a problem which I thought would be made better, plz correct me if I am wrong For those who only subscribe to Haskell-Cafe, Bob posted a very similar thread to ghc-users, which I replied to here with a suggestion

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-18 Thread Gregory Collins
On Tue, Oct 18, 2011 at 3:18 AM, Jason Dusek jason.du...@gmail.com wrote: The lazy bridging code, `lazyBridge', blocks (unsurprisingly) and does not allow packets to go back and forth. I think I need explicit selects/waits here to get the back and forth traffic. Maybe there is a some way to

Re: [Haskell-cafe] Fwd: GHC as a library error.

2011-10-18 Thread Paulo Pocinho
Thank you for the heads up; didn't know about the Scion library. Cheers! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-18 Thread Ertugrul Soeylemez
Jason Dusek jason.du...@gmail.com wrote: I don't think you want either of the functions you mentioned. What you probably want instead is to do concurrent programming by creating Haskell threads.  A hundred Haskell threads reading from Handles are translated to one or more OS threads

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-18 Thread Ertugrul Soeylemez
Michael Orlitzky mich...@orlitzky.com wrote: I have uploaded a simple concurrent echo server implementation to hpaste [1]. It uses one thread for the stdout logger, one thread for the server, one thread for each client and finally a main thread waiting for you to hit enter to quit the

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-18 Thread Christian Maeder
Am 12.10.2011 16:02, schrieb Bas van Dijk: API DOCS http://hackage.haskell.org/package/vector-bytestring-0.0.0.0 you could re-export VS.empty, VS.singleton, etc. directly. Cheers Christian -- | /O(1)/ The empty 'ByteString' empty :: ByteString empty = VS.empty {-# INLINE empty #-} -- |

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-18 Thread Roel van Dijk
2011/10/18 Christian Maeder christian.mae...@dfki.de: you could re-export VS.empty, VS.singleton, etc. directly. The vector singleton and the vector-bytestring singleton don't have the same type. vector: singleton :: a - Vector a vector-bytestring: singleton :: Word8 - Vector Word8 By

[Haskell-cafe] hello Haskell

2011-10-18 Thread R J
hey Haskell check it out http://www.fastnews10i.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-18 Thread Roel van Dijk
2011/10/18 Roel van Dijk vandijk.r...@gmail.com: Maybe we [can] create an example program which would fail with the more general type. Migrating the function foo from bytestring to vector-bytestring would fail with more general types: import Data.ByteString foo = print empty Ok, modules

[Haskell-cafe] Working with the code For Typing Haskell In Haskell

2011-10-18 Thread Patrick LeBoutillier
Hi all, I'm working with the code that accompanies this paper (http://web.cecs.pdx.edu/~mpj/thih/) and I'm trying to use it but I can't figure out how to get started. I have the following code but it is not giving me the expected result: import TypingHaskellInHaskell mapt = map :: Forall [Star,

[Haskell-cafe] Comparison Haskell, Java, C and LISP

2011-10-18 Thread yrazes
Hi, Maybe you remember my case. I was trying to compare some aspects of these languages. Well... I found that I can compare reflection, support for generics, simplicity and safe code. I just want to ask if you have more information for reflection in Haskell. I read that there is no enough for

Re: [Haskell-cafe] hello Haskell

2011-10-18 Thread Gregory Collins
On Tue, Oct 18, 2011 at 9:23 AM, R J rj248...@hotmail.com wrote: hey Haskell check it out http://www.fastnews10i.com OK, who has the ban hammer? G -- Gregory Collins g...@gregorycollins.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Comparison Haskell, Java, C and LISP

2011-10-18 Thread Stephen Tetley
Haskell has no support for reflection whatsoever. It can support compile time meta-programming with Template Haskell. Reflection itself might be antagonistic to functional programming, I suspect it is at odds with referential transparency. Most of the work on reflection seemed based around Lisp

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-18 Thread Jason Dusek
2011/10/18 Ertugrul Soeylemez e...@ertes.de: A proxy server acts a lot like an echo server.  The difference is that usually before the actual proxying starts you have a negotiation phase, and instead of echoing back to the same socket, you just write it to a different one.  Here is an

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-18 Thread Jason Dusek
2011/10/18 Gregory Collins g...@gregorycollins.net: On Tue, Oct 18, 2011 at 3:18 AM, Jason Dusek jason.du...@gmail.com wrote: The lazy bridging code, `lazyBridge', blocks (unsurprisingly) and does not allow packets to go back and forth. I think I need explicit selects/waits here to get the

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-18 Thread Jason Dusek
2011/10/18 Jason Dusek jason.du...@gmail.com: 2011/10/18 Ertugrul Soeylemez e...@ertes.de: A proxy server acts a lot like an echo server.  The difference is that usually before the actual proxying starts you have a negotiation phase, and instead of echoing back to the same socket, you just

Re: [Haskell-cafe] Comparison Haskell, Java, C and LISP

2011-10-18 Thread Nicu Ionita
Am 18.10.2011 18:53, schrieb Stephen Tetley: Haskell has no support for reflection whatsoever. It can support compile time meta-programming with Template Haskell. Reflection itself might be antagonistic to functional programming, I suspect it is at odds with referential transparency. Most of

Re: [Haskell-cafe] subclasses and classes with same type in instance

2011-10-18 Thread Albert Y. C. Lai
On 11-10-16 01:56 PM, Patrick Browne wrote: I get the same results from Listing 1 and Listing 2 below. I carefully diff'ed the two listings and found no difference except for comments. -- Listing 1- Subclass data Shed = Shed class Building building where addressB :: building -

Re: [Haskell-cafe] How to implement a digital filter, using Arrows?

2011-10-18 Thread Captain Freako
Hi John, Thanks for this reply: Date: Tue, 18 Oct 2011 14:05:22 +1030 From: John Lask jvl...@hotmail.com Subject: Re: [Haskell-cafe] How to implement a digital filter, using Arrows? To: haskell-cafe@haskell.org Message-ID: BLU0- smtp384394452fd2750fbe3bcfcc6...@phx.gbl

Re: [Haskell-cafe] How to implement a digital filter, using Arrows?

2011-10-18 Thread Ryan Ingram
Your type stopped being an arrow when the state type started to depend on the input type: Filter a b ~= (a, FS a) - (b, FS a) Filter b c ~= (b, FS b) - (c, FS b) It's impossible to compose these two functions into a single function of type Filter a c, because the state type doesn't match. You

Re: [Haskell-cafe] How to implement a digital filter, using Arrows?

2011-10-18 Thread John Lask
{-# LANGUAGE Arrows #-} This is literate code. It expounds on your initial question and provides two solutions based either on the StateArrow or Automaton module Test where import Data.List ( mapAccumL ) import Control.Arrow import Control.Arrow.Operations import

Re: [Haskell-cafe] Comparison Haskell, Java, C and LISP

2011-10-18 Thread yi huang
If i understand correctly, what we called generics is what so called reflection. It allow you to introspect type structure. http://haskell.org/ghc/docs/latest/html/libraries/ghc-prim-0.2.0.0/GHC-Generics.html#g:4 On Wed, Oct 19, 2011 at 12:03 AM, yrazes yra...@gmail.com wrote: Hi, Maybe you