Re: [Haskell-cafe] accessible layout proposal?

2009-09-23 Thread Jimmy Hartzell
On Sep 23, 2009, at 3:04 PM, Evan Laforge wrote: Let's not forget what the proposal actually _is_. It is that #( #[ #$ and # should become magic tokens such that #( {a;b;c} is read as (a,b,c) #[ {a;b;c} is read as [a,b,c] f #$ {a;b;c} is read as f (a) (b) (c)

Re: [Haskell-cafe] How to install GD library on Mac OSX?

2009-09-23 Thread Colin Adams
2009/9/22 Brandon S. Allbery KF8NH allb...@ece.cmu.edu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 22, 2009, at 13:44 , Colin Adams wrote: It needs some missing C libraries - gd, png, jpeg, fontconfig and freetype. Does anyone know what to do to install these on OSX?

Re[2]: [Haskell-cafe] accessible layout proposal?

2009-09-23 Thread Bulat Ziganshin
Hello Jimmy, Wednesday, September 23, 2009, 11:11:58 AM, you wrote: How about this (which I believe to be backwards compatible): brilliant! -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe

Re: [Haskell-cafe] How to install GD library on Mac OSX?

2009-09-23 Thread Judah Jacobson
On Wed, Sep 23, 2009 at 12:23 AM, Colin Adams colinpaulad...@googlemail.com wrote: 2009/9/22 Brandon S. Allbery KF8NH allb...@ece.cmu.edu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 22, 2009, at 13:44 , Colin Adams wrote: It needs some missing C libraries - gd, png, jpeg,

Re: [Haskell-cafe] How to install GD library on Mac OSX?

2009-09-23 Thread Colin Adams
Thanks Judah. That was all it took. :-) 2009/9/23 Judah Jacobson judah.jacob...@gmail.com: On Wed, Sep 23, 2009 at 12:23 AM, Colin Adams colinpaulad...@googlemail.com wrote: 2009/9/22 Brandon S. Allbery KF8NH allb...@ece.cmu.edu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 22,

[Haskell-cafe] Got it working, now trying to abstract it

2009-09-23 Thread Günther Schmidt
Hi all, I'm finished with my implementation, an app that analyses financial data for budgeting. But there are no abstractions in my code whatsoever, everything is coded exactly to the point. So now that I'm done I'd like to start it over, this time using far more abstractions than I

[Haskell-cafe] Re: Multiple-selection formlet?

2009-09-23 Thread Chris Eidhof
Hey Colin, Currently, I don't think this is supported. It would help a lot if you could send me a dumbed-down version of your code, I'll file an issue for it on github. Thanks, -chris On 23 sep 2009, at 14:35, Colin Adams wrote: Just in case you missed it on the cafe. --

Re: [Haskell-cafe] Problem with Text.XHtml.Strict.Formlets.file on Mac OSX

2009-09-23 Thread Chris Eidhof
Hey Colin, The code looks OK to me. Are you sure you are setting the right method for your form? It's the third component of the tuple returned by the runFormState. Thanks, -chris On 22 sep 2009, at 08:56, Colin Adams wrote: I'm writing a form that involves picking a file to upload,

Re: [Haskell-cafe] Problem with Text.XHtml.Strict.Formlets.file on Mac OSX

2009-09-23 Thread Chris Eidhof
OK, the trick is to set the attribute enctype=multipart/form-data on the form whenever your form contains a file upload item. Using the third parameter you can detect if this is the case. This is typical of using file-upload fields in web programming and independent of the formlets. It's

[Haskell-cafe] An encoding of parametricity in Agda

2009-09-23 Thread Eugene Kirpichov
Hi, I've discovered the following post on the internets: http://gelisam.blogspot.com/2009/09/samuels-really-straightforward-proof-of.html It contains an ingenious (to my mind) encoding of parametricity in Agda that makes the Free Theorems a trivial consequence. I've tried to formalize it in

Re: [Haskell-cafe] Re: [Hs-Generics] how to automatically create and install documentations of a package?

2009-09-23 Thread Andy Gimblett
On 21 Sep 2009, at 09:14, Martijn van Steenbergen wrote: Michael Shulman wrote: Is there a way to make it automatically update a single contents page with links to the documentation of all installed packages? See: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/53531/ focus=53560

[Haskell-cafe] Re: accessible layout proposal?

2009-09-23 Thread Stefan Monnier
http://www.haskell.org/haskellwiki/Accessible_layout_proposal I see two main problems with such a proposal (other than the particular details of the syntax chosen for it): - layout is not very well supported by most of the text editors, contrary to parens/brackets/braces. - more importantly:

[Haskell-cafe] Bug in writeArray?

2009-09-23 Thread Grzegorz Chrupała
Hi all, This seems like a bug in the implementation of writeArray: when passed an out-of-range index it silently writes to an incorrect index in the array. -- import Data.Array.IO import Data.Array.Unboxed main = do let (l,u) = ((0,10),(20,20)) marr - newArray (l,u) 0 :: IO (IOUArray

Re: [Haskell-cafe] Bug in writeArray?

2009-09-23 Thread Bulat Ziganshin
Hello Grzegorz, Wednesday, September 23, 2009, 7:19:59 PM, you wrote: This seems like a bug in the implementation of writeArray: when passed let (l,u) = ((0,10),(20,20)) writeArray computes raw index (from 0 to total number of array elements) and check that this index is correct. with

[Haskell-cafe] ANNOUNCE: Darcs Hacking Sprint - 14-15 November Vienna

2009-09-23 Thread Eric Kow
Dear Haskellers, The Darcs Team will soon be hosting its third hacking sprint. Details --- When : 14-15 November 2009 Where: University of Technology, Vienna, Austria Who : Anybody who wants to hack on Darcs (or Camp, Focal, SO6, etc) Beginners especially welcome! Why : Darcs

[Haskell-cafe] Re: [Coq-Club] An encoding of parametricity in Agda

2009-09-23 Thread Taral
On Wed, Sep 23, 2009 at 6:46 AM, Eugene Kirpichov ekirpic...@gmail.com wrote: It contains an ingenious (to my mind) encoding of parametricity in Agda that makes the Free Theorems a trivial consequence. Perhaps I don't understand Agda very well, but I don't see parametricity here. For one,

[Haskell-cafe] Re: [Coq-Club] An encoding of parametricity in Agda

2009-09-23 Thread Eugene Kirpichov
Under parametricity, I mean the Reynolds Abstraction Theorem, from which free theorems follow. The encoding allows one to prove the theorem for any particular function by implementing this function in terms of relativized types. The type of the relativized function is precisely an instance of

Re: [Haskell-cafe] FFMpeg, SDL and Haskell

2009-09-23 Thread Don Stewart
vasyl.pasternak: Hi all, Last few days I was playing with FFI, FFMpeg and Haskell. Currently I am trying to make this tutorial http://www.dranger.com/ffmpeg/ on Haskell. Now I have done tutorial 01 and tutorial 02 (show video stream in SDL window). The third tutorial is about audio, and

Re: [Haskell-cafe] help with cabal; trying to escape from configuration hell

2009-09-23 Thread Duncan Coutts
On Tue, 2009-09-22 at 17:13 +0200, S. Doaitse Swierstra wrote: I am trying to run happstack on my Mac, but unfortunately I am getting error messages as described in: http://code.google.com/p/happstack/issues/detail?id=88 The cure seems to be to downgrade to network-2.2.0.1, but

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Duncan Coutts
On Tue, 2009-09-22 at 17:08 -0400, Brandon S. Allbery KF8NH wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 22, 2009, at 11:31 , Günther Schmidt wrote: Gtk2hs then complains about running in a multithreaded ghc, ie. one with several real OS threads. Is it possible to start

Re: [Haskell-cafe] accessible layout proposal?

2009-09-23 Thread Jimmy Hartzell
I am a bit puzzled here. This seems to mean something like If you take readable code using an operator you can make it less readable, and when you do that you create another problem as well, and an even less readable hack can fix that. I know an old lady who swallowed a fly...

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Günther Schmidt
Am 23.09.2009, 19:29 Uhr, schrieb Duncan Coutts duncan.cou...@worc.ox.ac.uk: On Tue, 2009-09-22 at 17:08 -0400, Brandon S. Allbery KF8NH wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 22, 2009, at 11:31 , Günther Schmidt wrote: Gtk2hs then complains about running in a

[Haskell-cafe] Status of GHC as a Cross Compiler

2009-09-23 Thread John Van Enk
Hi, This may be more appropriate for a different list, but I'm having a hard time figuring out whether or not we're getting a cross compiler in 6.12 or not. Can some one point me to the correct place in Traq to find this information? /jve ___

[Haskell-cafe] [uvector] derive UA instance for newtype

2009-09-23 Thread Khudyakov Alexey
Hello I want to derive UA instance for newtypes. Say I have following newtype: newtype Foo a = Foo a Attempts to derive UA automatically fails because it have associated types. It seems that it's not possible to define from outside. However it's possible to derive instance in the uvector's

Re: [Haskell-cafe] Status of GHC as a Cross Compiler

2009-09-23 Thread Bulat Ziganshin
Hello John, Wednesday, September 23, 2009, 10:50:24 PM, you wrote: This may be more appropriate for a different list, but I'm having a hard time figuring out whether or not we're getting a cross compiler in 6.12 or not. Can some one point me to the correct place in Traq to find this

Re: [Haskell-cafe] [uvector] derive UA instance for newtype

2009-09-23 Thread Daniel Peebles
I believe this is a bug that was introduced in 6.10.2 (it definitely worked in 6.10.1) that has since been fixed in HEAD. This newtype deriving issue also prevents the uvector testsuite from running at the moment. You might want to try a different version of GHC? Dan On Wed, Sep 23, 2009 at

Re: [Haskell-cafe] Status of GHC as a Cross Compiler

2009-09-23 Thread Donnie Jones
Hello John, glasgow-haskell-users is a more appropriate list... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users I went ahead and cc'd your message to the list. Any replies please include John's email address as I don't think he is subscribed to the list. Hope that helps... --

Re: [Haskell-cafe] Quadratic complexity though use of STArrays

2009-09-23 Thread Dan Rosén
Thanks Daniel and Tobias, and sorry for posting something with an obvious miss in it (the function call) It works better with strict evaulation. best regards, Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Ross Mellgren
Well, keep in mind forkIO *might* be a different OS thread (unless it's bound, IIRC), depending on the number of workers (with -Nx) and so on. -Ross On Sep 23, 2009, at 2:24 PM, Günther Schmidt wrote: Am 23.09.2009, 19:29 Uhr, schrieb Duncan Coutts duncan.cou...@worc.ox.ac.uk : On Tue,

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Duncan Coutts
On Wed, 2009-09-23 at 20:24 +0200, Günther Schmidt wrote: No, but you can unsafeInitGUIForThreadedRTS. If you observe the foot-shooting restrictions (of which the easiest is to not use forkIO). And exactly herein lies the problem :) I've seen your response to the recent post about

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Duncan Coutts
On Wed, 2009-09-23 at 15:52 -0400, Ross Mellgren wrote: Well, keep in mind forkIO *might* be a different OS thread Yes. (unless it's bound, IIRC) In which case it's guaranteed to be on a different OS thread.. depending on the number of workers (with -Nx) and so on. The number of

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Günther Schmidt
Hi Duncan, so ... I have a green light to call gtk from within a forkIO thread for as long as I make sure that the rts is single threaded? BTW: I was already strongly put off using unsafeInitGUIwForThreadedRTS but thanks for the warning. Thus my back to my original question: Can I start

Re: [Haskell-cafe] accessible layout proposal?

2009-09-23 Thread Richard O'Keefe
[PPIG: this is the middle of a discussion about style in the programming language Haskell and the degree to which one could improve things by overloading newline.] This proposal notwithstanding, I find 'concat [a, b, c]' much more readable than (a) ++ (b) ++ (c), Yes, but now you've changed

[Haskell-cafe] An issue with EDSLs in the ``finally tagless'' tradition

2009-09-23 Thread Brad Larsen
I seem to have run into an instance of the expression problem [1], or something very similar, when experimenting with ``finally tagless'' EDSLs, and don't see a good way to work around it. I have been experimenting with embedded DSLs, using the techniques described in a couple recent papers

Re: [Haskell-cafe] Re: [Coq-Club] An encoding of parametricity in Agda

2009-09-23 Thread Dan Doel
On Wednesday 23 September 2009 12:21:00 pm Taral wrote: On Wed, Sep 23, 2009 at 6:46 AM, Eugene Kirpichov ekirpic...@gmail.com wrote: It contains an ingenious (to my mind) encoding of parametricity in Agda that makes the Free Theorems a trivial consequence. Perhaps I don't understand Agda

Re: [Haskell-cafe] An issue with EDSLs in the ``finally tagless'' tradition

2009-09-23 Thread Luke Palmer
On Wed, Sep 23, 2009 at 7:59 PM, Brad Larsen brad.lar...@gmail.com wrote: The trouble comes in when defining a more general arithmetic expression type class.  Suppose we want polymorphic arithmetic expressions: class PolyArithExpr exp where   constant :: a     - exp a   addP     :: exp a -

Re: [Haskell-cafe] Parallel graphics

2009-09-23 Thread Claude Heiland-Allen
Andrew Coppin wrote: (OK, well the *best* way is to use the GPU. But AFAIK that's still a theoretical research project, so we'll leave that for now.) Works for me :-) http://claudiusmaximus.goto10.org/cm/2009-09-24_fl4m6e_in_haskell.html There doesn't need to be a sound theoretical

Re: [Haskell-cafe] An issue with EDSLs in the ``finally tagless'' tradition

2009-09-23 Thread Brad Larsen
Luke, On Wed, Sep 23, 2009 at 11:12 PM, Luke Palmer lrpal...@gmail.com wrote: On Wed, Sep 23, 2009 at 7:59 PM, Brad Larsen brad.lar...@gmail.com wrote: The trouble comes in when defining a more general arithmetic expression type class. Suppose we want polymorphic arithmetic expressions:

Re: [Haskell-cafe] An issue with EDSLs in the ``finally tagless'' tradition

2009-09-23 Thread Peter Gammie
Brad: On 24/09/2009, at 11:59 AM, excerpts of what Brad Larsen wrote: We then try to define an evaluator: -- instance PolyArithExpr E where -- constant = E -- addP e1 e2 = E (eval e1 + eval e2) -- bzzt! The instance definition for `addP' is not type correct: Could not deduce (Num

Re: [Haskell-cafe] An issue with EDSLs in the ``finally tagless'' tradition

2009-09-23 Thread Brad Larsen
Luke, On Wed, Sep 23, 2009 at 11:12 PM, Luke Palmer lrpal...@gmail.com wrote: On Wed, Sep 23, 2009 at 7:59 PM, Brad Larsen brad.lar...@gmail.com wrote: The trouble comes in when defining a more general arithmetic expression type class. Suppose we want polymorphic arithmetic expressions:

Re: [Haskell-cafe] An issue with EDSLs in the ``finally tagless'' tradition

2009-09-23 Thread Brad Larsen
Peter, On Thu, Sep 24, 2009 at 12:22 AM, Peter Gammie pete...@gmail.com wrote: [...] Ambiguity is IMHO best handled with a judicious application of type (or data) families, but you can get surprisingly far by simply requiring that every class member mention all type variables in the class

Re: [Haskell-cafe] An issue with EDSLs in the ``finally tagless'' tradition

2009-09-23 Thread Peter Gammie
Brad, On 24/09/2009, at 2:45 PM, Brad Larsen wrote: On Thu, Sep 24, 2009 at 12:22 AM, Peter Gammie pete...@gmail.com wrote: [...] Ambiguity is IMHO best handled with a judicious application of type (or data) families, but you can get surprisingly far by simply requiring that every class

[Haskell-cafe] best practices for monad transformers and exceptions?

2009-09-23 Thread Evan Laforge
I don't have an especially deep understanding of monad transformers... basically, I asked around (thanks #haskell!) and struggled and with helpful advice came up with something that seemed to work for me, only now I'm having trouble. What I'm trying to do is hardly revolutionary or even advanced,

[Haskell-cafe] Beginning of a meta-Haskell [was: An issue with the ``finally tagless'' tradition]

2009-09-23 Thread oleg
The topic of an extensible, modular interpreter in the tagless final style has come up before. A bit more than a year ago, on a flight from Frankfurt to San Francisco I wrote two interpreters for a trivial subset of Haskell or ML (PCF actually), just big enough for Power, Fibonacci and other