Re: [Haskell-cafe] SIGPLAN Programming Languages Software Award

2011-06-07 Thread Daniël de Kok
On Jun 7, 2011, at 7:53 PM, Isaac Potoczny-Jones wrote: > For 2011, the winners of the award are > > Simon Peyton Jones and Simon Marlow of > Microsoft Research, Cambridge, for GHC Congratulations :)! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Richard O'Keefe
On 7/06/2011, at 9:36 PM, Guy wrote: > > Out of interest, is there any other language where the comment delimiter is > invalid if immediately followed by a symbol? Not exactly what you asked, but in some implementations of Algol, comment This is a comment; commentThis is a synta

Re: [Haskell-cafe] HUnit false-positive stumper

2011-06-07 Thread KQ
Didn't get to this last night but I've just now confirmed this. With a normal build (defaulting to -O) the test code below generates only 3 failures (MacOS Leopard w/GHC 6.12.3 and HUnit 1.2.2.3). When using -O0 or by changing assertFailure in Test.HUnit.Lang (line 81) to use E.throwIO instea

Re: [Haskell-cafe] haskell platform question

2011-06-07 Thread Tim Docker
On 07/06/11 14:03, Brandon Allbery wrote: On Tue, Jun 7, 2011 at 07:34, Tim Docker wrote: do others go about testing their code with many hackage dependencies against a new ghc? I would have expected that the first thing to do would be get the We don't, for the most part; ghc is a quickly mo

Re: [Haskell-cafe] Non-advanced usage of Type classes

2011-06-07 Thread Yves Parès
...and the other one being operational (which I find simpler). 2011/6/8 Brandon Allbery > On Tue, Jun 7, 2011 at 16:16, Arnaud Bailly > wrote: > > For example, while designing some program (a game...) I defined a type > class > > thus: > > > >> class (Monad io) => CommandIO io where > >> read

Re: [Haskell-cafe] Non-advanced usage of Type classes

2011-06-07 Thread Brandon Allbery
On Tue, Jun 7, 2011 at 16:16, Arnaud Bailly wrote: > For example, while designing some program (a game...) I defined a type class > thus: > >> class (Monad io) => CommandIO io where >>  readCommand  :: io Command >>  writeResult  :: CommandResult -> io () This is in fact one of the reasons to use

Re: [Haskell-cafe] Non-advanced usage of Type classes

2011-06-07 Thread Yves Parès
> Is this badly designed code that tries to mimic OO in a functional setting? If the answer is yes, how could I achieve same result (eg. testing the code that does command REPL) without defining type classes? Why would that be badly designed? And why would that be more OO? IMO it is a perfectly s

Re: [Haskell-cafe] Non-advanced usage of Type classes

2011-06-07 Thread Evan Laforge
>> Here's how I do it: >> >> data InteractiveState = InteractiveState { >>  state_read :: IO Command >>  , state_write :: Result -> IO () >>  } >> > > How about : > >> data InteractiveState io = InteractiveState { >> state_read :: io Command >> , state_write :: Result -> io () >> } I guess you cou

Re: [Haskell-cafe] Distributing Haskell GUI apps for Windows/MacOS?

2011-06-07 Thread Henk-Jan van Tuyl
On Tue, 07 Jun 2011 12:58:52 +0200, Pedro Vasconcelos wrote: Hello, I've implemented a Haskell program to play a modern board game. I've put it on Hackage (http://hackage.haskell.org/package/hstzaar) but would also like to distribute to people without the Haskell development tools. Are ther

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread wren ng thornton
On 6/7/11 1:01 PM, James Cook wrote: On Jun 7, 2011, at 12:43 PM, MigMit wrote: wren ng thornton wrote: One particularly trivial example that comes to mind is: newtype Mu f = Mu (f (Mu f)) instance Show (f (Mu f)) => Show (Mu f) where show (Mu x) = "Mu (" ++ show x ++ ")" -- Or however you'd

Re: [Haskell-cafe] Non-advanced usage of Type classes

2011-06-07 Thread Arnaud Bailly
On Tue, Jun 7, 2011 at 10:32 PM, Evan Laforge wrote: > > Is this badly designed code that tries to mimic OO in a functional > setting? > > If the answer is yes, how could I achieve same result (eg. testing the > code > > that does command REPL) without defining type classes? > > Here's how I do

Re: [Haskell-cafe] Non-advanced usage of Type classes

2011-06-07 Thread Evan Laforge
> Is this badly designed  code that tries to mimic OO in a functional setting? > If the answer is yes, how could I achieve same result (eg. testing the code > that does command REPL) without defining type classes? Here's how I do it: data InteractiveState = InteractiveState { state_read :: IO C

[Haskell-cafe] Non-advanced usage of Type classes

2011-06-07 Thread Arnaud Bailly
Hello, In a recent thread, it has been asserted that defining type class is something you seldom need when programming in Haskell. There is one thing that as non-professional Haskell programmer I found type-classes useful for: Testing. This is probably very OO and is pretty much influenced by what

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-07 Thread Simon Meier
2011/6/7 Bryan O'Sullivan : > On Tue, Jun 7, 2011 at 1:40 AM, Simon Meier wrote: >> >> Why would you need 'unsafePerformIO'. You can scrutinise the 'PS' >> constructors of the slice without dropping down to IO. > > True. Oops :-) > >> >> Using a Builder for concatentation makes sense, if you want

[Haskell-cafe] ANNOUNCE: time-recurrence-0.5.2

2011-06-07 Thread Chris Heller
I'm happy to announce the first fully functional release of time-recurrence: http://hackage.haskell.org/package/time-recurrence As of version 0.5.2, the library is now powerful enough to express all recurring dates which can be specified via the iCalendar RFC. An example: Generate the 15th

Re: [Haskell-cafe] Twidge and "lsfollowers --all"

2011-06-07 Thread Brandon Allbery
On Tue, Jun 7, 2011 at 06:57, Keith Edmunds wrote: > my expectation is that all followers of $USERNAME will be listed. However, > what appears to happen is that the first 100 followers' names are > displayed, then there is a pause, then the same 100 names are displayed > again; this cycle repeats

Re: [Haskell-cafe] haskell platform question

2011-06-07 Thread Brandon Allbery
On Tue, Jun 7, 2011 at 07:34, Tim Docker wrote: > On 07/06/2011, at 8:48 PM, Don Stewart wrote: > >> Oh, sorry, missed the first line. Building against GHC snapshots isn't >> supported. > > Surely wanting to test against a ghc snapshot isn't that odd? How The point of the Haskell Platform is to p

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-06-07 Thread Nicu Ionita
Am 07.06.2011 19:37, schrieb Andrew Coppin: On 06/06/2011 09:34 PM, Nicu Ionita wrote: Hi, Just to double check: that means, today it's not possible to generate 64 bit operations under Windows, including bit level .&., .|. a.s.o. (from Data.Bits), and this situation will stay like this for a w

[Haskell-cafe] SIGPLAN Programming Languages Software Award

2011-06-07 Thread Isaac Potoczny-Jones
I'm pleased to be able to relay the following announcement from ACM SIGPLAN: The SIGPLAN Programming Languages Software Award is awarded to an institution or individual(s) to recognize the development a software system that has had a significant impact on programming language research, impleme

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-06-07 Thread Andrew Coppin
On 06/06/2011 09:34 PM, Nicu Ionita wrote: Hi, Just to double check: that means, today it's not possible to generate 64 bit operations under Windows, including bit level .&., .|. a.s.o. (from Data.Bits), and this situation will stay like this for a while. I'm asking this because I'm currently

Re: [Haskell-cafe] cap 3: stopping thread 3 (stackoverflow)

2011-06-07 Thread Johannes Waldmann
> I came up with this using immutable unboxed arrays [...] > sss :: Int -> Int -> UArray Int Int -> O Nice. - Although what you do here is actually "C programming": you have a "global" array, and work on its indices. Actually you always have a pair of indices, denoting a subsequence. It would be

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-07 Thread Simon Michael
I like the goal of the stability field, but I don't know how to use it. Is it intended to track a package's overall maturity ? Eg: experimental - alpha - beta - almost ready - stable - mature - obsolete Or, since many packages have multiple major and minor releases, to track the current release

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread James Cook
On Jun 7, 2011, at 12:43 PM, MigMit wrote: One particularly trivial example that comes to mind is: newtype Mu f = Mu (f (Mu f)) instance Show (f (Mu f)) => Show (Mu f) where show (Mu x) = "Mu (" ++ show x ++ ")" -- Or however you'd like to show it Ehm, that does look like p

Re: [Haskell-cafe] Library Versioning

2011-06-07 Thread Luis Cabellos
> > Did you tell cabal that Paths_my_package is a part of your library? If it > is referenced by your code, then it should be listed in either > "exposed-modules" or "other-modules", otherwise it won't be installed. I've > never used dyre so I don't know whether it would cause any issues, but I >

Re: [Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

2011-06-07 Thread David Barbour
On Tue, Jun 7, 2011 at 6:14 AM, Casey McCann wrote: > On Mon, Jun 6, 2011 at 7:55 PM, David Barbour wrote: > > Earlier forms of my reactive demand programming model [1] - before I > > switched to arrows - would qualify. The model has limited side-effects > (e.g. > > power a camera on only when s

Re: [Haskell-cafe] Library Versioning

2011-06-07 Thread James Cook
On Jun 7, 2011, at 12:28 PM, Luis Cabellos wrote: You can export things from one module that are defined in other modules. For example: > module MyPackage ( version, ... ) > import Paths_my_package( version ) > ... Yes indeed, but I getting ugly errors (undefined references to version I

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread MigMit
> One particularly trivial example that comes to mind is: > >newtype Mu f = Mu (f (Mu f)) > >instance Show (f (Mu f)) => Show (Mu f) where >show (Mu x) = "Mu (" ++ show x ++ ")" >-- Or however you'd like to show it Ehm, that does look like poor design. Sure you don't me

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread Scott Lawrence
I wrote: > type Model a = (Ord a) => Set a -- the set of lexemes > -> [a] -- the original text to model > -> [a] -- list of previous lexemes > -> ProbDist a -- the next lexeme > > and then > > entropy :: Model a -> Set a -> [

Re: [Haskell-cafe] Library Versioning

2011-06-07 Thread Luis Cabellos
You can export things from one module that are defined in other modules. > For example: > > > module MyPackage ( version, ... ) > > > import Paths_my_package( version ) > > ... > > Yes indeed, but I getting ugly errors (undefined references to version I think) when use Paths_my_package from librar

Re: [Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

2011-06-07 Thread David Barbour
On Mon, Jun 6, 2011 at 4:05 PM, Casey McCann wrote: > ArrowChoice and ArrowApply are conceptually distinct and I expect > there are instances of the former that have no possible instance for > the latter. Branching vs. Monad I am much less certain of. > For a real-time or embedded DSL, or hardwa

Re: [Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

2011-06-07 Thread David Barbour
On Sun, Jun 5, 2011 at 12:51 PM, KC wrote: > If new intermediate classes crop up then there would be no point in fixing > > class (Applicative m) => Monad m where > > since it would have to be changed if new intermediate classes are found. > You might check out a few articles regarding Kleisli a

Re: [Haskell-cafe] cap 3: stopping thread 3 (stackoverflow)

2011-06-07 Thread David Peixotto
GHC starts threads with a small stack size to efficiently support lightweight concurrency. As a thread uses more stack space, it will be expanded as needed up to some maximum fixed size. I think these stack overflow events you see are the runtime expanding the thread stacks. You can adjust the

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Guy
On 07/06/2011 10:55, Ivan Lazar Miljenovic wrote: Another argument against special-casing "--|": what happens if you want to use a _different_ documentation generator (I don't know why you would, but someone might) than Haddock, which uses a different markup identifier? We can declare new opera

Re: [Haskell-cafe] cap 3: stopping thread 3 (stackoverflow)

2011-06-07 Thread Claude Heiland-Allen
Hi, On 07/06/11 14:22, Johannes Waldmann wrote: Would this work better with Data.Sequence instead of List? (Is there a really cheap way (O(1)) to split some Data.Sequence roughly in half?) I came up with this using immutable unboxed arrays, which gives a nice parallel speedup (and somehow av

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread Yves Parès
Personally, I came much less against UndecidableInstances when I was trying to do OOP in Haskell than when I was trying do Prolog-like things at the type level. Things like transitive relations: (If a type B contains an A, and if C contains B, then C contains A, and so on). I kind of abandonned qui

[Haskell-cafe] Mysterious complaint about .hi files

2011-06-07 Thread Josef Svenningsson
Hi cafe! I'm hitting a very strange problem when using haskell-src-exts and haskell-src-exts-qq. Consider the following module: \begin{code} {-# Language QuasiQuotes #-} module TestBug where import Language.Haskell.Exts import Language.Haskell.Exts.QQ unit = TyTuple Boxed [] ty = [dec| quux ::

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread Yitzchak Gale
I wrote: >>> You almost never want to use UndecidableInstances >>> when writing practical programs in Haskell. >>> When GHC tells you that you need them, it almost >>> always means that your types are poorly designed, >>> usually due to influence from previous experience >>> with OOP. wren ng thor

Re: [Haskell-cafe] Library Versioning

2011-06-07 Thread James Cook
On Jun 7, 2011, at 11:10 AM, Luis Cabellos wrote: Hello, I have a question about cabal versioning. It's possible to export in a cabal library a version, so instead of getting version from: import Paths_my_package( version ) I want to get version from my library using: import MyPack

[Haskell-cafe] Library Versioning

2011-06-07 Thread Luis Cabellos
Hello, I have a question about cabal versioning. It's possible to export in a cabal library a version, so instead of getting version from: import Paths_my_package( version ) I want to get version from my library using: import MyPackage( version ) And then using this from programs. Than

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-07 Thread Bryan O'Sullivan
On Tue, Jun 7, 2011 at 1:40 AM, Simon Meier wrote: > Why would you need 'unsafePerformIO'. You can scrutinise the 'PS' > constructors of the slice without dropping down to IO. True. Oops :-) > Using a Builder for concatentation makes sense, if you want to exploit > that copying a slice of the

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-07 Thread James Cook
On Jun 7, 2011, at 10:17 AM, Christopher Done wrote: On 7 June 2011 15:05, James Cook wrote: It's good, in my opinion, to be able to state succinctly in a standardized way that, although it does something now, what the code does and how it does it are probably going to change in the future.

Re: [Haskell-cafe] cap 3: stopping thread 3 (stackoverflow)

2011-06-07 Thread Brandon Moore
- Original Message - > From: Johannes Waldmann > Sent: Tuesday, June 7, 2011 8:22 AM > > Here's source and logs: > > http://www.imn.htwk-leipzig.de/~waldmann/draft/skpp11/subseqsum/Subseqsum.hs > > The program is meant to show an application of the "third homomorphism > theorem" > app

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-07 Thread Christopher Done
On 7 June 2011 15:05, James Cook wrote: > It's good, in my opinion, to be able to state succinctly in a standardized > way that, although it does something now, what the code does and how it does > it are probably going to change in the future. > I think no one really updates this field and it's

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-07 Thread Gábor Lehel
On Tue, Jun 7, 2011 at 3:05 PM, James Cook wrote: > On Jun 6, 2011, at 10:57 PM, Chris Smith wrote: > >> I got asked a question today about why Control.Applicative is labeled as >> "experimental" on Hackage.  Perhaps that field is something of a failed >> experiment, and it remaining there is like

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-07 Thread Casey McCann
On Tue, Jun 7, 2011 at 9:22 AM, Tillmann Rendel wrote: > On > http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Applicative.html, > in the upper right corner, the module is marked as "experimental". I think > this is a Haddock feature, not a Hackage feature. Oddly, I couldn

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-07 Thread James Cook
On Jun 7, 2011, at 9:22 AM, Tillmann Rendel wrote: Hi, James Cook wrote: As far as Control.Applicative, I'm not sure to what package you're referring. That label doesn't apply to modules, it applies to packages, and Control.Applicative is a part of the "base" package (which is not labeled e

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-07 Thread Tillmann Rendel
Hi, James Cook wrote: As far as Control.Applicative, I'm not sure to what package you're referring. That label doesn't apply to modules, it applies to packages, and Control.Applicative is a part of the "base" package (which is not labeled experimental). On http://hackage.haskell.org/packages/

Re: [Haskell-cafe] cap 3: stopping thread 3 (stackoverflow)

2011-06-07 Thread Johannes Waldmann
Here's source and logs: http://www.imn.htwk-leipzig.de/~waldmann/draft/skpp11/subseqsum/Subseqsum.hs The program is meant to show an application of the "third homomorphism theorem" approach (hom-based structural parallel programming). My observation (for this program) is that there is little spe

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-07 Thread James Cook
On Jun 6, 2011, at 10:57 PM, Chris Smith wrote: I got asked a question today about why Control.Applicative is labeled as "experimental" on Hackage. Perhaps that field is something of a failed experiment, and it remaining there is likely to confuse people. Just a thought... not sure of the

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-07 Thread Yitzchak Gale
Bryan O'Sullivan wrote: >> Now that I think of it: in principle, you could >> write a specialised concat that would check the pointer/offset/length >> combinations of its arguments and, if they all abutted perfectly, would just >> return a new view into that same array, sans copying. Gregory Colli

Re: [Haskell-cafe] haskell platform question

2011-06-07 Thread Ivan Lazar Miljenovic
On 7 June 2011 21:34, Tim Docker wrote: > > Surely wanting to test against a ghc snapshot isn't that odd? How > do others go about testing their code with many hackage dependencies against > a new ghc? I would have expected that the first thing to do would be get the > platform up and running. Si

Re: [Haskell-cafe] haskell platform question

2011-06-07 Thread Tim Docker
On 07/06/2011, at 8:48 PM, Don Stewart wrote: Oh, sorry, missed the first line. Building against GHC snapshots isn't supported. Surely wanting to test against a ghc snapshot isn't that odd? How do others go about testing their code with many hackage dependencies against a new ghc? I would h

Re: [Haskell-cafe] Distributing Haskell GUI apps for Windows/MacOS?

2011-06-07 Thread Eric Kow
On Tue, Jun 07, 2011 at 11:58:52 +0100, Pedro Vasconcelos wrote: > Are there any easy ways of making installers for Windows/MacOS > (preferably using free or open source tools)? On MacOS X, applications typically do not come with installers. Instead you have some kind of disk image (a tarball will

Re: [Haskell-cafe] Distributing Haskell GUI apps for Windows/MacOS?

2011-06-07 Thread Mats Rauhala
There is bamse [1], but it's last been updated in 2009, and has build-failures for 6.10, 6.12 and 7.0. It has some dependency weirdness, like wanting both base >= 4 and < 4. I don't know how difficult it would be to upgrade it to modern haskell, but I'm sure the changes would be appreciated. [1]

[Haskell-cafe] Distributing Haskell GUI apps for Windows/MacOS?

2011-06-07 Thread Pedro Vasconcelos
Hello, I've implemented a Haskell program to play a modern board game. I've put it on Hackage (http://hackage.haskell.org/package/hstzaar) but would also like to distribute to people without the Haskell development tools. Are there any easy ways of making installers for Windows/MacOS (preferably

[Haskell-cafe] Twidge and "lsfollowers --all"

2011-06-07 Thread Keith Edmunds
The github Twidge page [https://github.com/jgoerzen/twidge/wiki] states that this is the right place for questions about Twidge, so here goes. When running twidge lsfollowers --all $USERNAME my expectation is that all followers of $USERNAME will be listed. However, what appears to happen

Re: [Haskell-cafe] haskell platform question

2011-06-07 Thread Don Stewart
Oh, sorry, missed the first line. Building against GHC snapshots isn't supported. On Tue, Jun 7, 2011 at 6:48 AM, Don Stewart wrote: > It should build. If it doesn't, please report a bug. > > On Tue, Jun 7, 2011 at 8:53 AM, Tim Docker wrote: >> I'd like to build the haskell platform against a re

Re: [Haskell-cafe] haskell platform question

2011-06-07 Thread Don Stewart
It should build. If it doesn't, please report a bug. On Tue, Jun 7, 2011 at 8:53 AM, Tim Docker wrote: > I'd like to build the haskell platform against a recent GHC snapshot, for > testing purposes. > > I see that I can download the source for the platform from: > > > http://lambda.galois.com/hp-

Re: [Haskell-cafe] Maybe use advice

2011-06-07 Thread Lyndon Maydwell
I was considering using a matrix optimisation but things are out of control enough already :) Converting all Changes constructors to nested regular constructors may be the easiest approach. It would certainly eliminate the mess of list manipulations. On Tue, Jun 7, 2011 at 6:21 PM, John Lato wro

Re: [Haskell-cafe] Maybe use advice

2011-06-07 Thread John Lato
If I'm interpreting your code properly, it's not currently catching that case anyway. The problem is that you've got two sets of modifiers that both should be optimized, explicit Modifier constructors in the Image, and a list contained in Changes. Since 'Changes' is just a list of Modifiers, and

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Ketil Malde
Guy writes: > Out of interest, is there any other language where the comment > delimiter is invalid if immediately followed by a symbol? Perl has a rather infamous example where the comment syntax may depend on run-time properties - would that count? whatever / 25 ; # / ; die "this dies!";

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Guy
On 07/06/2011 10:55, Ivan Lazar Miljenovic wrote: On 7 June 2011 17:50, Guy wrote: On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote: On 7 June 2011 17:41, Guywrote: I originally posted because I found that --| stood out much more clearly as a structured comment than -- |. How does a mi

Re: [Haskell-cafe] Maybe use advice

2011-06-07 Thread Lyndon Maydwell
The fixpoint nature of rewrite catches some cases that transform might not if I'm interpreting it correctly. (Changes [Translate 1 1, Scale 1 1, Translate 1 1]) could be rewritten as (Translate 2 2), but I'm not sure that it could be translated as such if it matches against (Changes [Translate _ _

Re: [Haskell-cafe] Maybe use advice

2011-06-07 Thread John Lato
Is it necessary (helpful) to use 'rewrite'? Nearly every time I've tried it, in the end 'transform' has been a better choice. Then you wouldn't need the 'Just's at all, and it should work fine. John > From: Lyndon Maydwell > > (missed including cafe) > > f :: [Modification] -> Maybe [Modifica

Re: [Haskell-cafe] cap 3: stopping thread 3 (stackoverflow)

2011-06-07 Thread Johannes Waldmann
> As a workaround, you can use the "show-ghc-events" binary that is > provided by the ghc-events package. Thanks, I wasn't aware of that. Are the following lines normal for an eventlog? ... 1877298000: cap 1: waking up thread 4 on cap 1 1877299000: cap 1: thread 4 is runnable 1877305000: cap 6

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-07 Thread Simon Meier
2011/6/6 Bryan O'Sullivan : > On Sun, Jun 5, 2011 at 11:00 AM, Yitzchak Gale wrote: >> >> If behind the scenes the concat is copying directly from slices of the >> original >> input, then no, in principle we're not saving much then. >> I thought there were *two* copies going on. > > If you're usin

Re: [Haskell-cafe] cap 3: stopping thread 3 (stackoverflow)

2011-06-07 Thread Andres Loeh
I don't think a stack overflow event indicates an RTS bug. Stack overflow events usually result in the RTS trying to adjust the stack size, and only if that fails, the program is halted. > (... and why can't I copy/paste the text from threadscope's output window) As a workaround, you can use the

[Haskell-cafe] cap 3: stopping thread 3 (stackoverflow)

2011-06-07 Thread Johannes Waldmann
I am running a Haskell program with some par/pseq annotations. When I use threadscope to view the eventlog (not "timeline" but "events") I see a lot of stackoverflow messages. What is this? I don't get any RTS errors printed on the console. The program finishes normally (albeit with less speedup

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Ivan Lazar Miljenovic
On 7 June 2011 17:50, Guy wrote: > On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote: >> >> On 7 June 2011 17:41, Guy  wrote: >>> I originally posted because I found that --| stood out much more clearly >>> as >>> a structured comment than -- |. >> >> How does a missing space character make that st

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread oleg
It seems that UndercidableInstances keep getting a bad rap. There are legitimate and decidable applications of UndercidableInstances. These applications have nothing to do with OOP, or HList for that matter. This topic is discussed at length in the article http://okmij.org/ftp/Haskell/typ

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Guy
On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote: On 7 June 2011 17:41, Guy wrote: On 06/06/2011 22:14, Evan Laforge wrote: Back to Haskell: I agree, the choice of the comment delimiter was not the best in light of the possibility to define operators containing it as a substring. But changing

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Ivan Lazar Miljenovic
On 7 June 2011 17:41, Guy wrote: > On 06/06/2011 22:14, Evan Laforge wrote: >>> >>> Back to Haskell: I agree, the choice of the comment delimiter was not the >>> best in light of the possibility to define operators containing it as a >>> substring. But changing it to have "--|" start a comment too

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Guy
On 06/06/2011 22:14, Evan Laforge wrote: Back to Haskell: I agree, the choice of the comment delimiter was not the best in light of the possibility to define operators containing it as a substring. But changing it to have "--|" start a comment too might break too much code (and eliminating "--" a

Re: [Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

2011-06-07 Thread wren ng thornton
On 6/6/11 7:05 PM, Casey McCann wrote: On Mon, Jun 6, 2011 at 5:32 PM, Matthew Steele wrote: branchApplicative = liftA3 (\b t f -> if b then t else f) This definition doesn't satisfy the laws given for the Branching class; it will execute the effects of both branches regardless of which is c