Re: [Haskell-cafe] Parsec error message not making any sense

2013-07-09 Thread Fredrik Karlsson
Hi Roman, I'm using parsec-3.1.3 I put the code in a gist here - sorry about that. https://gist.github.com/dargosch/5955045 Fredrik On Tue, Jul 9, 2013 at 12:08 AM, Roman Cheplyaka r...@ro-che.info wrote: Hi Fredrik, First, do you use the latest parsec version (3.1.3)? If not, can you

Re: [Haskell-cafe] Linux users needed for OpenGL extensions survey

2013-07-09 Thread Tom Ellis
On Mon, Jul 08, 2013 at 09:55:08PM -0700, Kirill Zaborsky wrote: Brian, I think it would be better to provide your email in the thread. E.g. from http://www.haskell.org/pipermail/haskell-cafe/2013-July/109061.html I can only reply to the maillist. I'm answering now through Google Groups

Re: [Haskell-cafe] ANNOUNCE: Ajhc Haskell Compiler 0.8.0.7 Release

2013-07-09 Thread Robert Wills
I'd be very interested in a pic32 port. On Mon, Jul 8, 2013 at 7:24 PM, Tommy Thorn tt1...@yahoo.com wrote: On Jul 6, 2013, at 03:07 , Kiwamu Okabe kiw...@debian.or.jp wrote: Umm... Is your question Is Ajhc's goal that build the compiler for Android? If so, the answer is No. The Ajhc's

Re: [Haskell-cafe] ANNOUNCE: Ajhc Haskell Compiler 0.8.0.7 Release

2013-07-09 Thread Kiwamu Okabe
Hi Jeremy. On Tue, Jul 9, 2013 at 3:30 AM, Jeremy Shaw jer...@n-heptane.com wrote: Any plans on supporting the popular Raspberry Pi platform? I poked at the source code a bit, but I didn't even know where to begin. I think you can do it already, if you have cross GCC for Raspberry Pi.

Re: [Haskell-cafe] Parsec error message not making any sense

2013-07-09 Thread Roman Cheplyaka
Please check your code. I had two problems with it: mixed tabs and spaces, and undefined 'quotedChar'. After defining quotedChar = anyChar, I get a different error message from yours: *Main parseFromFile textgridfile testdata.TextGrid Left testdata.TextGrid (line 137, column 1):

Re: [Haskell-cafe] GHC trac

2013-07-09 Thread Marios Titas
The registration page reappeared. There's also a Reset Password page. But none of them woks correctly. They return the following error: Trac detected an internal error: IOError: [Errno 2] No such file or directory: u'/srv/trac/ghc/trac.htpasswd' On Mon, Jul 8, 2013 at 4:28 AM, Marios Titas

[Haskell-cafe] Understanding version differences

2013-07-09 Thread Patrick Browne
Hi,The code [1] below compiles and runs with GHCi version 7.0.4.I get one warning and an error message with GHCi version 7.6.1.1)  Warning -XDatatypeContexts is deprecated. Unless there are propagation effects, this is well explained.2) foom-1.hs:65:15:    `quality' is applied to too many type

[Haskell-cafe] Probabilistic functional programming with Baysig/BayesHive

2013-07-09 Thread Tom Nielsen
Dear cafe, I would like to announce that the Baysig programming language and the BayesHive analytics environment (http://bayeshive.com) are now available for beta testers. Baysig is a new probabilistic, functional and typed programming language that attempts to realise the vision of fully

Re: [Haskell-cafe] Probabilistic functional programming with Baysig/BayesHive

2013-07-09 Thread Jerzy Karczmarczuk
Le 09/07/2013 13:53, Tom Nielsen a écrit : Almost everything else -- optimal decisions, categorisation, (...) -- becomes trivial. Optimal decisions trivial? Interesting... And not so frequent... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Harder Question - Chapter 4 - 4.12 - haskell the craft of functional programming - Second Edition

2013-07-09 Thread Anton Nikishaev
Manoel Menezes manoel.menezes...@gmail.com writes: Hi everybody! I am trying to solve the question for a long time: [4.12 Harder] Find out the maximum number of pieces we can get by making a given number of flat (that is planar) cuts through a solid block. It is not the same answer as we

[Haskell-cafe] ERP/CRM solution with Haskell ?

2013-07-09 Thread Loïc Maury
Hello all, I don't know if it's the good mailing list to post, if not my apologize for that. I am actually looking for an ERP/CRM solution. Is there a solution (like dolibarr or openerp), but in Haskell to do that ? Thank you Loïc ___ Haskell-Cafe

Re: [Haskell-cafe] Understanding version differences

2013-07-09 Thread Roman Cheplyaka
The compiler defaults the kind of 'quality' (i.e. the first argument of QUALITIES) to *, not being able to infer it from the class definition itself (and other definitions that it references). Since you want it to have kind * - *, you should enable KindSignatures and add an annotation, or

[Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Andreas Abel
Hi, is this a known bug or feature of GHC (7.4.1, 7.6.3)?: I got a looping behavior in one of my programs and could not explain why. When I rewrote an irrefutable let with guards to use a case instead, the loop disappeared. Cut-down: works = case Just 1 of { Just x | x 0 - x } loops

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Dan Doel
The definition Just x | x 0 = Just 1 is recursive. It conditionally defines Just x as Just 1 when x 0 (and as bottom otherwise). So it must know the result before it can test the guard, but it cannot know the result until the guard is tested. Consider an augmented definition: Just x |

Re: [Haskell-cafe] Open Source project suitable for 2-3 persons this fall?

2013-07-09 Thread Brent Yorgey
On Thu, Jul 04, 2013 at 05:26:59PM +0200, Anders Bech Mellson wrote: Is there any project that needs working this fall which could be used as a university project? I am in the university (M.Sc. in software development), so I am mainly looking for project ideas (preferably concrete ones).

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Roman Cheplyaka
As Dan said, this behaviour is correct. The confusing thing here is that in case expressions guards are attached to the patterns (i.e. to the lhs), while in let expressions they are attached to the rhs. So, despite the common Just x | x 0 part, your examples mean rather different things.

[Haskell-cafe] Boulder Haskell Programmers, Next Meeting July 17

2013-07-09 Thread Peter Jones
The Boulder Haskell Programmer Group is getting together on July 17 at 6:30pm. All experience levels are welcome. Agenda: * 6:30--7:00: Social/beer time. * 7:00--7:30: What do we want from this group? * 7:30--8:30: Introduction to Haskell Types. * 8:30--9:00: Whatever!

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Andreas Abel
Thanks, Dan and Roman, for the explanation. So I have to delete the explanation non-recursive let = single-branch case from my brain. I thought the guards in a let are assertations, but in fact it is more like an if. Ok. But then I do not see why the pattern variables are in scope in the

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Felipe Almeida Lessa
Well, you could use p's type for something. let x | foo (undefined `asTypeOf` x) = 3 foo _ = True in x Arguably not very useful. It seems to me that the most compelling rationale is being consistent with the cases where, instead of being a data type, p is a function. Even so most of

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Dan Doel
With pattern guards, it's difficult to say whether it is never 'useful' to have things like the following work: C x | C' y z - f x = ... But I'd also shy away from changing the behavior because it causes a lot of consistency issues. In let f vs1 | gs1 = es1 h vs2 | gs2 = es2

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Andreas Abel
Hi Felipe, thanks for the centavos. So you mean that in let p | g = e where bs in ... the bindings bs should be in scope in g (and of course the variables of p are in scope in bs). Mmh, the bindings in bs that do not uses the pattern variables could be useful in g, but the other

Re: [Haskell-cafe] Understanding version differences

2013-07-09 Thread Patrick Browne
Thanks to Roman and Eric for for their  clear explanations.PatOn 09/07/13, Roman Cheplyaka r...@ro-che.info wrote:The compiler defaults the kind of 'quality' (i.e. the first argument ofQUALITIES) to *, not being able to infer it from the class definitionitself (and other definitions that it

Re: [Haskell-cafe] Optimization flag changing result of code execution

2013-07-09 Thread kudah
Same here, I used mwc-random to generate random strings. It works in ghci and when compiled with -O0, but with -O1 and -O2 I've been getting exclusively a's and b's. On Sun, 17 Mar 2013 18:48:06 +0500 Azeem -ul-Hasan aze...@live.com wrote: I am using GHC 7.6.1 mwc-random 0.12.0.1

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Andreas Abel
On 09.07.2013 19:56, Dan Doel wrote: With pattern guards, it's difficult to say whether it is never 'useful' to have things like the following work: C x | C' y z - f x = ... But I'd also shy away from changing the behavior because it causes a lot of consistency issues. In let

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Aleksey Khudyakov
On 08.07.2013 23:54, Chris Smith wrote: So I've been thinking about something, and I'm curious whether anyone (in particular, people involved with GHC) think this is a worthwhile idea. I'd like to implement an extension to GHC to offer a different behavior for literals with polymorphic types.

Re: [Haskell-cafe] Optimization flag changing result of code execution

2013-07-09 Thread Aleksey Khudyakov
On 09.07.2013 22:10, kudah wrote: Same here, I used mwc-random to generate random strings. It works in ghci and when compiled with -O0, but with -O1 and -O2 I've been getting exclusively a's and b's. It looks like MWC generates only 0 and 1 for some reason. I've tried to write simple test but

Re: [Haskell-cafe] Parsec error message not making any sense

2013-07-09 Thread Fredrik Karlsson
Hi, Sorry, that was a careless extraction of code - I should have made sure that it was complete. Please, have a look again. When downloading and running the gist ( https://gist.github.com/dargosch/5955045) , I still get the error: Main let testFile =

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Chris Smith
Oh, yes. That looks great! Also seems to work with OverloadedStrings in the natural way in GHC 7.6, although that isn't documented. Now if only it didn't force NoImplicitPrelude, since I really want to -hide-package base and -package my-other-prelude. Even adding -XImplicitPrelude doesn't

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Chris Smith
Oh, never mind. In this case, I guess I don't need an extension at all! On Tue, Jul 9, 2013 at 1:47 PM, Chris Smith cdsm...@gmail.com wrote: Oh, yes. That looks great! Also seems to work with OverloadedStrings in the natural way in GHC 7.6, although that isn't documented. Now if only it

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Chris Smith
Ugh... I take back the never mind. So if I replace Prelude with an alternate definition, but don't use RebindableSyntax, and then hide the base package, GHC still uses fromInteger and such from base even though it should be inaccessible. But if I do use RebindableSyntax, then the end-user has to

[Haskell-cafe] Is the following implemented by a sparse matrix representation? type Graph n w = Array (n, n) (Maybe w)

2013-07-09 Thread KC
type Graph n w = Array (n,n) (Maybe w) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Optimization flag changing result of code execution

2013-07-09 Thread kudah
I've attached the script that I had trouble with. It tries to replicate one directory structure in another directory, while replacing filenames and file contents with random data. When compiled with -O1 or -O2 resulting file and directory names are composed only of a's and b's, but file contents

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Aleksey Khudyakov
On 10.07.2013 01:13, Chris Smith wrote: Ugh... I take back the never mind. So if I replace Prelude with an alternate definition, but don't use RebindableSyntax, and then hide the base package, GHC still uses fromInteger and such from base even though it should be inaccessible. But if I do use

Re: [Haskell-cafe] Optimization flag changing result of code execution

2013-07-09 Thread Aleksey Khudyakov
On 10.07.2013 01:38, kudah wrote: I've attached the script that I had trouble with. It tries to replicate one directory structure in another directory, while replacing filenames and file contents with random data. When compiled with -O1 or -O2 resulting file and directory names are composed only

[Haskell-cafe] ANNOUNCE: MFlow 3.0

2013-07-09 Thread Alberto G. Corona
The third version of MFlow is out. http://hackage.haskell.org/package/MFlow MFlow is an all-heterodox web application framework, but very haskellish. Now MFlow support restful URLs. It is the first stateful web framework to my knowledge that supports it. The type safe routes are implicitly

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Chris Smith
This is working now. Trying to use -XRebindableSyntax with -XImplicitPrelude seems to not work (Prelude is still not loaded) when the exposed Prelude is from base, but it works fine when the Prelude is from a different package. Counterintuitive, but it does everything I need it to. Thanks for