Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-11 Thread Mitar
Hi! On Wed, Nov 10, 2010 at 4:48 PM, Simon Marlow wrote: > You can use maskUninterruptible in GHC 7, but that is not generally > recommended, Maybe there should be some function like maskUninterruptibleExceptUser which would mask everything except UserInterrupt exception. Or maybe UserInterrupt

Re: [Haskell-cafe] Re: Manatee - The Haskell/Gtk+ Integrated Live Environment first version release!

2010-11-11 Thread Karel Gardas
On 11/12/10 04:37, Andy Stewart wrote: > Hi all, > > I have write Simple Manual at http://haskell.org/haskellwiki/Manatee > > Enjoy! :) Hello! I'm trying to follow installation steps on OpenSolaris 2009.06, but glib installation fails with: $ cabal install --user glib Resolving dependencies...

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Ben Lippmeier
On 12/11/2010, at 2:26 AM, Malcolm Wallace wrote: >> The point is that refusing something you can have now (though >> of course it's an open question whether TDNR is something we can "have >> now") out of fear that it'll prevent you getting something better >> later is speculative and often backf

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Mark Lentczner
My tuppence: I feel like the main impetus for TDNR is the awkwardness of records, especially when there are multiple record types within a module (as there often are). Now, if one proceeds as one has to today, then one may find: data Foo = Foo { fooName :: String, fooValue :: Double } data Bar

Re: Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread David Menendez
On Thu, Nov 11, 2010 at 10:00 PM, John Lask wrote: >> On Thu, Nov 11, 2010 at 8:16 PM, John Lask  wrote: >>> >>> consider "length" ... >>> >>> I have records with the attribute length, length can be given as an Int, >>> Double, Float or maybe as a constructed type "Length", length's use as a >>> r

Re: [Haskell-cafe] Re: Manatee - The Haskell/Gtk+ Integrated Live Environment first version release!

2010-11-11 Thread Andy Stewart
David Leimbach writes: > Wow! > > Is this just for Linux or is anyone able to run it on Mac OS X? I don't know whether can work on Mac. I design it for Linux. -- Andy > > Dave > > On Thu, Nov 11, 2010 at 7:51 PM, Andy Stewart > wrote: > > My project want to provide a fact: > >

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Sebastian Fischer
On Nov 12, 2010, at 5:43 AM, Richard O'Keefe wrote: A saucepan whose handle keeps falling off is defective, I do not see TDNR as unambiguously defective as a loose saucepan handle. The amount of time spent maintaining a program is much higher than the amount of time spent creating it initial

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread wren ng thornton
On 11/11/10 8:54 PM, Richard O'Keefe wrote: I remind readers once again that in SML record selectors *don't* clash with names of functions. I am not concerned here to argue either for or against SML-style records and their selectors, only to point out that wanting *record fields* whose significa

Re: [Haskell-cafe] Re: Manatee - The Haskell/Gtk+ Integrated Live Environment first version release!

2010-11-11 Thread David Leimbach
Wow! Is this just for Linux or is anyone able to run it on Mac OS X? Dave On Thu, Nov 11, 2010 at 7:51 PM, Andy Stewart wrote: > My project want to provide a fact: > > Haskell not just can do GUI environment, and can do better! > > Gtk2hs + Haskell Threads is awesome! > > Below is source code l

[Haskell-cafe] Re: Manatee - The Haskell/Gtk+ Integrated Live Environment first version release!

2010-11-11 Thread Andy Stewart
My project want to provide a fact: Haskell not just can do GUI environment, and can do better! Gtk2hs + Haskell Threads is awesome! Below is source code lines of Manatee: All : 21651 Core and toolkit : 7047 Daemon and Window Manager: 3656

[Haskell-cafe] Re: Manatee - The Haskell/Gtk+ Integrated Live Environment first version release!

2010-11-11 Thread Andy Stewart
Hi all, I have write Simple Manual at http://haskell.org/haskellwiki/Manatee Enjoy! :) -- Andy Andy Stewart writes: > Hi all, > > I am proud to announce the release my gtk2hs project : Manatee - The > Haskell/Gtk+ Integrated Live > Environment > > http://hackage.haskell.org/package/manatee

Re: Better Records was Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Evan Laforge
> This motivated my original reply this post. The trouble is, what > constitutes better records? There are as many views as users of Haskell, I > bet. > > My main motivation is: > > As mentioned in my original post: better name space management. > > Surprisingly enough, I find the current record sy

Re: Fwd: Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Donn Cave
Quoth John Lask , ... > By the way I am not arguing for TDNR, merely that all is not well with > haskell records. And you have a lot of company there, but the discussion is taking place in a thread named "Type Directed Name Resolution". When that has been put to rest, let's talk about Haskell rec

Fwd: Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread John Lask
On Thu, Nov 11, 2010 at 8:16 PM, John Lask wrote: consider "length" ... I have records with the attribute length, length can be given as an Int, Double, Float or maybe as a constructed type "Length", length's use as a record selector would also clash with List.length. All these have the same de

[Haskell-cafe] Rebindable record syntax

2010-11-11 Thread Philippa Cowderoy
I stood up and suggested rebindable record syntax at Anglohaskell earlier this year, but never got round to posting a proposal. Given the TDNR discussion, it seems timely to link everyone to what I'd got round to writing: http://flippac.org/RebindableRecordSyntax.html Apologies for the lack o

Fwd: Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread John Lask
On 12/11/2010, at 2:16 PM, John Lask wrote: On 12/11/2010 9:22 AM, Richard O'Keefe wrote: I'm afraid it's not a *convincing* use case. It's not convincing because here "owner" *means different things*. consider "length" ... I have records with the attribute length, length can be given a

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Luke Palmer
On Thu, Nov 11, 2010 at 6:16 PM, Dan Doel wrote: > serialize is not at all the same in this regard. There is no class of > functions that is immune to its inspection powers, presumably, because that's > its whole point. But that also means that there is no class of functions for > which we are jus

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Richard O'Keefe
On 12/11/2010, at 2:16 PM, John Lask wrote: > On 12/11/2010 9:22 AM, Richard O'Keefe wrote: >> >> I'm afraid it's not a *convincing* use case. >> It's not convincing because here "owner" *means different things*. > > > consider "length" ... > > I have records with the attribute length, length

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread David Menendez
On Thu, Nov 11, 2010 at 8:16 PM, John Lask wrote: > consider "length" ... > > I have records with the attribute length, length can be given as an Int, > Double, Float or maybe as a constructed type "Length", length's use as a > record selector would also clash with List.length. All these have the

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread John Lask
On 12/11/2010 9:22 AM, Richard O'Keefe wrote: On 12/11/2010, at 2:17 AM, Michael Snoyman wrote: So why would you ever need to reuse the same field name in the same module? data PetOwner data FurnitureOwner data Cat = Cat { owner :: PetOwner } data Chair = Chair { owner :: FurnitureOwner } J

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Dan Doel
On Thursday 11 November 2010 11:54:56 am Sjoerd Visscher wrote: > Yes, but it would not break any existing code. It would only break code > that knowingly did the wrong thing. Well, if we added a function that randomly scrambled GHC's heap memory, it wouldn't break any existing code, because none

Better Records was Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread John Lask
> > If the outcome of this discussion is a clamour for better records > instead of TDNR, then that would certainly make me happy. > > Regards, > Malcolm well I certainly am clamouring for better records. This motivated my original reply this post. The trouble is, what constitutes better record

Re: [Haskell-cafe] [ANNOUNCE] csound-expression - csound combinator library

2010-11-11 Thread Erik de Castro Lopo
Anton Kholomiov wrote: > but I like what haddock is doing > with styles and how it links to functions and modules. Well maybe move it to src/Tutorial, then you get the bext of both worlds, the tutorial is easy to find and it gets haddock docs. Erik -- ---

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Richard O'Keefe
On 12/11/2010, at 3:22 AM, Ozgur Akgun wrote: > On 11 November 2010 01:19, Richard O'Keefe wrote: > I'm not sure that it is desirable to have "many records in the > same module" in the first place. > > Amongst other reasons, > http://www.haskell.org/haskellwiki/Mutually_recursive_modules The

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Alexander Solla
On Nov 11, 2010, at 1:42 PM, Stephen Tetley wrote: [*] In case anyone looks up MacGuffin on Wikipedia, I don't think the description there is strictly accurate. A MacGuffin doesn't drive the plot so much as throw the viewer of the scent. I think Hitchcock might disagree with you. In any case

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Richard O'Keefe
On 12/11/2010, at 2:53 AM, Stephen Tetley wrote: > > This is fairly onerous for people who are programming to an outside > schema (i.e. a relational database) as it leads to boiler plate along > two axes - data type definitions plus class definitions for accessors. Boiler plate is GOOD news, bec

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Richard O'Keefe
On 12/11/2010, at 2:17 AM, Michael Snoyman wrote: >> So why would you ever need to reuse the same field name in the same >> module? > > data PetOwner > data FurnitureOwner > > data Cat = Cat { owner :: PetOwner } > data Chair = Chair { owner :: FurnitureOwner } > > Just the first thing that cam

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Dan Doel
On Thursday 11 November 2010 12:34:21 pm John Lato wrote: > I think the only way this would work would be if you consider functions to > be equal only to themselves, i.e. "x+x" and "2*x" are not equal. That's > not a trade-off I would be willing to make. In general, it doesn't even have to be bas

[Haskell-cafe] Quasiquoter invocation no longer requires/allows a leading dollar sign.

2010-11-11 Thread Michael Snoyman
Sorry, maybe I missed the memo on this one, but I just noticed this change to quasi-quotation syntax on the GHC 7 upgrade page[1]. So if GHC 6.12 *requires* the dollar sign, and GHC 7 *rejects* the dollar sign, is there any way to write code that will run on both? Is there a reason we can't keep th

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Richard O'Keefe
On 11/11/2010, at 10:33 PM, Gábor Lehel wrote: > I would have TDNR apply only in cases where: ... > - The ambiguity can be resolved by looking at the type of the first > (taking currying into account, only) parameter of each function and, > looking at the type constructors from the outside in, co

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Stephen Tetley
On 11 November 2010 21:23, C. McCann wrote: > [Snip] What started > this thread, however, was the idea of a serialization function > producing something like a pure ByteString, and why that, as opposed > to (IO ByteString), would be extremely problematic. I think the original poster was intrigu

Re: [Haskell-cafe] Splittable random numbers

2010-11-11 Thread Luke Palmer
On Thu, Nov 11, 2010 at 3:13 AM, Richard Senington wrote: > I got hold of, and looked through the paper suggested in the root of this > thread “Pseudo random trees in Monte-Carlo", and based upon this > I have thrown together a version of the binary tree based random number > generator suggested.

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread C. McCann
On Thu, Nov 11, 2010 at 3:30 PM, Stephen Tetley wrote: > The conclusion notes in passing that OCaml's persistence isn't > referentially transparent. If the Haskell version wasn't, I'd expect a > mea culpa from the authors at this point. >From a quick glance at the paper, the Haskell version is re

Re: [Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Duncan Coutts
On 11 November 2010 11:23, Nils Schweinsberg wrote: >Configuring pcre-light-0.4... >cabal: Missing dependency on a foreign library: >* Missing C library: pcre On 11 November 2010 12:41, Stephen Tetley wrote: > Do you have the headers installed as well as the dlls? With this error me

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Richard O'Keefe
On 11/11/2010, at 4:02 PM, Sebastian Fischer wrote: > Why blame languages instead of writers? We _find fault_ with programming languages and we _blame_ their designers. A programming language is a tool. A saucepan whose handle keeps falling off is defective, and if someone who didn't realise th

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Stephen Tetley
Apologies - an unfortunate typo in my first sentence (extra "don't") , it should have read: : > But I don't see that you need introspection at user level for > persistence, a dynamic type will do, thus the internals aren't open to > inspection. Whatever introspection is necessary can be handled by

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Stephen Tetley
But I don't see that you don't need introspection at user level for persistence, a dynamic type will do, thus the internals aren't open to inspection. Whatever introspection is necessary can be handled by the runtime system as in Clean and Persistent Haskell. You could look at the internals of a pi

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Gregory Crosswhite
On 11/11/10 12:07 PM, C. McCann wrote: To retain sanity, either "types that can be serialized" must be marked explicitly (perhaps in the context, similar to having a Data.Typeable constraint) to indicate potential non-parametric shenanigans You mean, like Data.Binary? Cheers, Greg

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread C. McCann
On Thu, Nov 11, 2010 at 1:57 PM, Stephen Tetley wrote: > On 11 November 2010 18:01, C. McCann wrote: > >> For instance, assuming serialize can be applied to functions of any >> type, it would probably be trivial to write a function (isExpr :: a -> >> Bool) that reports whether an arbitrary term i

Re: [Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Stephen Tetley
Have you tried with double backslash \\ and starting from the root? I think runhaskell under MinGW uses this form: > runhaskell Setup.hs configure > --extra-include-dirs=C:\\msys\\1.0\\local\\include > --extra-lib-dirs=C:\\msys\\1.0\\local\\lib I haven't built a binding for a while so I've forg

Re: [Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Nils Schweinsberg
Am 11.11.2010 14:25, schrieb Stephen Tetley: I'm not sure about an environment variable. Adding the MinGW\ prefix looks wrong, you may have to experiment with paths and forward or back slash separators a bit. I can't remember which convention (Windows) cabal uses. I tried every possible combina

Re: [Haskell-cafe] [ANNOUNCE] csound-expression - csound combinator library

2010-11-11 Thread Anton Kholomiov
Maybe haskellWiki is proper place for this, but I like what haddock is doing with styles and how it links to functions and modules. 2010/11/10 Erik de Castro Lopo > > Anton Kholomiov wrote: > > > no, it's not here any more, but i've added tutorial. look for update > > > > http://hackage.haskell

Re: [Haskell-cafe] Stack Overflow?

2010-11-11 Thread Ben Christy
It was basically that. I was doing TransformedMatrix = TransformedMatrix * TransformMatrrix and should have been doing Transformed Matrix = RotatedMatrix * TransforrmMatrix On Thu, Nov 11, 2010 at 10:03 AM, Dmitry Astapov wrote: > On Thu, Nov 11, 2010 at 4:58 PM, Ben Christy > wrote: > > I have

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Stephen Tetley
On 11 November 2010 18:01, C. McCann wrote: > For instance, assuming serialize can be applied to functions of any > type, it would probably be trivial to write a function (isExpr :: a -> > Bool) that reports whether an arbitrary term is a primitive value or > the result of some expression [SNIP]

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Claus Reinke
but if improved records are never going to happen Just to inject the usual comment: improved records have been here for quite some time now. In Hugs, there is TREX; in GHC, you can define your own. No need to wait for them. Using one particular random variation of extensible records and labels

Re: [Haskell-cafe] Opportunity for Haskell porting to java at R&D labs in Bay Area, CA

2010-11-11 Thread David Fox
I would hesitate to call it a terrible decision unless I had a good idea of what the ratio of Java programmers to Haskell programmers was out in the world. Just sayin... On Thu, Nov 11, 2010 at 7:14 AM, namekuseijin wrote: > given all Oracle woes in the last few months, I'd say this is a > terri

[Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread C. McCann
Oops, forgot to send this to the list... sorry, Sjoerd. On Thu, Nov 11, 2010 at 11:54 AM, Sjoerd Visscher wrote: >> You would lose many uses of equational reasoning in your programs. Have you >> every substituted 'x * 2' for the expression 'x + x' in one of your programs, >> or vice versa? You ca

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Sjoerd Visscher
On Nov 11, 2010, at 6:34 PM, John Lato wrote: > I don't know to what extent it would apply in this hypothetical situation, > but ghc (and probably other compilers) rely upon Haskell's semantics in > performing various code transformations. If you break the semantics some > transformations bec

RE: [Haskell-cafe] ghc dump the code for derived instances

2010-11-11 Thread Simon Peyton-Jones
-ddump-deriv From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Ozgur Akgun Sent: 11 November 2010 14:27 To: Haskell cafe Subject: [Haskell-cafe] ghc dump the code for derived instances Café, Is there a way to make GHC dump the code for auto-derived ty

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread John Lato
> > From: Sjoerd Visscher > > On Nov 11, 2010, at 3:36 PM, Dan Doel wrote: > > > On Thursday 11 November 2010 6:22:06 am Sjoerd Visscher wrote: > > > >> The reasoning above is used regularly to shoot down some really useful > >> functionality. So what would go wrong if we chose to take the practic

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Sjoerd Visscher
On Nov 11, 2010, at 3:36 PM, Dan Doel wrote: > On Thursday 11 November 2010 6:22:06 am Sjoerd Visscher wrote: > >> The reasoning above is used regularly to shoot down some really useful >> functionality. So what would go wrong if we chose to take the practical >> path, and leave aside the theoret

Re: [Haskell-cafe] Re: "Haskell is a scripting language inspired by Python."

2010-11-11 Thread Pierpaolo Bernardi
On Thu, Nov 4, 2010 at 20:54, Andrew Coppin wrote: > On 04/11/2010 02:16 PM, Jonathan Geddes wrote: > I mean, comparing BASIC to FP is like comparing a water > pistol to a tactical thermonuclear device. You have the similitude backward. It's Haskel that is fun and BASIC which caused disasters.

Re: [Haskell-cafe] Gödel' s System T

2010-11-11 Thread Lauri Alanko
On Thu, Nov 11, 2010 at 04:04:07PM +, Aaron Gray wrote: > On 11 November 2010 11:43, Petr Pudlak wrote: > > Thanks Dan, the book is really interesting, all parts of it. It looks like > > I'll read the whole book. > Watch out for the decidability issue though :- > > http://citeseerx.ist.p

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread C. McCann
On Thu, Nov 11, 2010 at 10:53 AM, Ketil Malde wrote: > ..and you are able to tell the difference.  Am I wrong in thinking that > this could be made to work if serialization was to/from an opaque type > instead of (Byte)String, so that the *only* operations would be > serialization and deserializat

Re: [Haskell-cafe] Re: "Haskell is a scripting language inspired by Python."

2010-11-11 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/11/10 11:12 , Simon Marlow wrote: > I bootstrapped GHC from the intermediate C files on a 640K PC around 1993 or > so. I don't remember exactly, but I think it might have worked, for some > small value of "work". If you used the right build env

[Haskell-cafe] Re: "Haskell is a scripting language inspired by Python."

2010-11-11 Thread Simon Marlow
On 04/11/2010 22:38, Lennart Augustsson wrote: It happened at various universities around the world. Look at the original Haskell committee and you'll get a good idea where. The smallest Haskell I know of is Gofer/Hugs; it originally ran on a 640k PCs. Before that languages like SASL and KRC ra

Re: [Haskell-cafe] Gödel's System T

2010-11-11 Thread Aaron Gray
On 11 November 2010 11:43, Petr Pudlak wrote: > Thanks Dan, the book is really interesting, all parts of it. It looks like > I'll read the whole book. > > Watch out for the decidability issue though :- http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.6.6483 Aaron > Best regards,

Re: [Haskell-cafe] ghc dump the code for derived instances

2010-11-11 Thread Ozgur Akgun
Thanks! On 11 November 2010 14:52, Daniel Fischer wrote: > On Thursday 11 November 2010 15:27:09, Ozgur Akgun wrote: > > Café, > > > > Is there a way to make GHC dump the code for auto-derived type class > > instances, say for Show, Eq and such? > > -ddump-deriv > > > > > Thanks, > > Ozgur > >

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Ketil Malde
Dan Doel writes: > You'd lose the whole notion of 'the category of haskell types and functions' > goodbye, too. Does f . id = f? Not if the former serializes as "f . id". ..and you are able to tell the difference. Am I wrong in thinking that this could be made to work if serialization was to/f

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Malcolm Wallace
The point is that refusing something you can have now (though of course it's an open question whether TDNR is something we can "have now") out of fear that it'll prevent you getting something better later is speculative and often backfires. I think we are very far from having TDNR "now". It is

Re: [Haskell-cafe] Opportunity for Haskell porting to java at R&D labs in Bay Area, CA

2010-11-11 Thread namekuseijin
given all Oracle woes in the last few months, I'd say this is a terrible timing and terrible decision. How about instead an experienced Haskell programmer to best leverage it rather than a junior who's learned java at university and has just read "Learn Haskell in 2 weeks"? On Wed, Nov 10, 2010 a

Re: [Haskell-cafe] Stack Overflow?

2010-11-11 Thread Dmitry Astapov
On Thu, Nov 11, 2010 at 4:58 PM, Ben Christy wrote: > I have implemented a scene graph in Haskell and I have a problem. I walk > down the scenegraph and at each node I recalculate translation matrix and > pass it to each child. Well it seems to be causing a stack overflow and I am > lost as to how

Re: [Haskell-cafe] ghc dump the code for derived instances

2010-11-11 Thread Daniel Fischer
On Thursday 11 November 2010 15:27:09, Ozgur Akgun wrote: > Café, > > Is there a way to make GHC dump the code for auto-derived type class > instances, say for Show, Eq and such? -ddump-deriv > > Thanks, > Ozgur ___ Haskell-Cafe mailing list Haskell-Ca

[Haskell-cafe] Stack Overflow?

2010-11-11 Thread Ben Christy
I have implemented a scene graph in Haskell and I have a problem. I walk down the scenegraph and at each node I recalculate translation matrix and pass it to each child. Well it seems to be causing a stack overflow and I am lost as to how to resolve the issue without issue a state variable of some

[Haskell-cafe] Re: ANN: network-2.2.3, merger with network-bytestring

2010-11-11 Thread Johan Tibell
On Sun, Oct 31, 2010 at 4:14 PM, Johan Tibell wrote: > Hi all, > > I like to announce a new version of the network package, > network-2.2.3. You can install the latest version by running: > >    cabal update && cabal install network > > This version marks the end of the network-bytestring package,

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Dan Doel
On Thursday 11 November 2010 6:22:06 am Sjoerd Visscher wrote: > What I'm wondering is if it would actually break things if serialize would > not produce the same String for these functions. Yes. It would break the (usual) mathematical underpinnings of Haskell. > The reasoning above is used regul

[Haskell-cafe] ghc dump the code for derived instances

2010-11-11 Thread Ozgur Akgun
Café, Is there a way to make GHC dump the code for auto-derived type class instances, say for Show, Eq and such? Thanks, Ozgur ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Ozgur Akgun
On 11 November 2010 01:19, Richard O'Keefe wrote: > I'm not sure that it is desirable to have "many records in the > same module" in the first place. > Amongst other reasons, http://www.haskell.org/haskellwiki/Mutually_recursive_modules -- Ozgur Akgun __

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Gábor Lehel
On Thu, Nov 11, 2010 at 2:59 PM, Miguel Mitrofanov wrote: > > > 11.11.2010 16:53, Stephen Tetley пишет: >> >> On 11 November 2010 13:10, Lauri Alanko  wrote: >> >>> {-# LANGUAGE EmptyDataDecls, MultiParamTypeClasses, >>> FunctionalDependencies #-} >>> >>> data PetOwner >>> data FurnitureOwner >>>

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Miguel Mitrofanov
11.11.2010 16:53, Stephen Tetley пишет: On 11 November 2010 13:10, Lauri Alanko wrote: {-# LANGUAGE EmptyDataDecls, MultiParamTypeClasses, FunctionalDependencies #-} data PetOwner data FurnitureOwner data Cat = Cat { catOwner :: PetOwner } data Chair = Chair { chairOwner :: FurnitureOwner

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Stephen Tetley
On 11 November 2010 13:10, Lauri Alanko wrote: > > {-# LANGUAGE EmptyDataDecls, MultiParamTypeClasses, FunctionalDependencies #-} > > data PetOwner > data FurnitureOwner > > data Cat = Cat { catOwner :: PetOwner } > data Chair = Chair { chairOwner :: FurnitureOwner } > > class Owned a b | a -> b

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Michael Snoyman
On Thu, Nov 11, 2010 at 3:10 PM, Lauri Alanko wrote: > On Thu, Nov 11, 2010 at 03:17:39PM +0200, Michael Snoyman wrote: >> data PetOwner >> data FurnitureOwner >> >> data Cat = Cat { owner :: PetOwner } >> data Chair = Chair { owner :: FurnitureOwner } > > These are clearly related uses, so as I s

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Gábor Lehel
On Thu, Nov 11, 2010 at 2:29 PM, Malcolm Wallace wrote: >> I'll just note that LLVM is only >> platform independent to a degree. Or rather, I believe the situation >> is that it *is* architecture independent, but it doesn't abstract >> anything else besides the architecture > > In particular, imag

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Lauri Alanko
On Thu, Nov 11, 2010 at 03:17:39PM +0200, Michael Snoyman wrote: > data PetOwner > data FurnitureOwner > > data Cat = Cat { owner :: PetOwner } > data Chair = Chair { owner :: FurnitureOwner } These are clearly related uses, so as I said, you can use a type class to overload the accessor name in

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Malcolm Wallace
I'll just note that LLVM is only platform independent to a degree. Or rather, I believe the situation is that it *is* architecture independent, but it doesn't abstract anything else besides the architecture In particular, imagine how you might serialise a Haskell function which is an FFI bindi

Re: [Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Stephen Tetley
On 11 November 2010 13:21, Nils Schweinsberg wrote: > > Is there an environment variable for this? As I said, I tried using > --extra-include-dirs with MinGW\include. I'm not sure about an environment variable. Adding the MinGW\ prefix looks wrong, you may have to experiment with paths and forwa

Re: [Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Nils Schweinsberg
Am 11.11.2010 13:41, schrieb Stephen Tetley: Do you have the headers installed as well as the dlls? For headers, MSys will have a search path of at least these two directories msys\1.0\local\include MinGW\include Is there an environment variable for this? As I said, I tried using --extra-inc

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Gábor Lehel
On Thu, Nov 11, 2010 at 2:15 PM, Jesse Schalken wrote: > 2010/11/11 Gábor Lehel >> >> Obviously there are questions here with regards to the functions which >> the to-be-serialized function makes use of -- should they be >> serialized along with it? Required to be present when it is >> deserializ

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Michael Snoyman
On Thu, Nov 11, 2010 at 2:24 PM, Lauri Alanko wrote: > On Thu, Nov 11, 2010 at 07:04:16PM +1030, John Lask wrote: >> >>>it is often desirable to have the same field names >> >>>for many records in the same module. > >> very much so, this is currently possible, with the restriction that >> the fiel

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Jesse Schalken
2010/11/11 Gábor Lehel > Obviously there are questions here with regards to the functions which > the to-be-serialized function makes use of -- should they be > serialized along with it? Required to be present when it is > deserialized? Is it OK for the function to do something different when > i

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Lauri Alanko
On Thu, Nov 11, 2010 at 07:04:16PM +1030, John Lask wrote: > >>>it is often desirable to have the same field names > >>>for many records in the same module. > very much so, this is currently possible, with the restriction that > the field names must have the same type modulo the record it is > sel

Re: [Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Stephen Tetley
Do you have the headers installed as well as the dlls? For headers, MSys will have a search path of at least these two directories msys\1.0\local\include MinGW\include ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Gábor Lehel
On Thu, Nov 11, 2010 at 12:22 PM, Sjoerd Visscher wrote: >> The equality that people typically expect to hold for Haskell expressions is >> that two such expressions are equal if they denote the same thing, as Max >> said. Expressions with function type denote mathematical functions, and so if >>

Re: [Haskell-cafe] Gödel' s System T

2010-11-11 Thread Petr Pudlak
Thanks Dan, the book is really interesting, all parts of it. It looks like I'll read the whole book. Best regards, Petr On Wed, Nov 10, 2010 at 05:21:16PM -0500, Dan Doel wrote: On Wednesday 10 November 2010 1:42:00 pm Petr Pudlak wrote: I was reading the paper "Total Functional Programmi

Re: [Haskell-cafe] Opportunity for Haskell porting to java at R&D labs in Bay Area, CA

2010-11-11 Thread Atze Dijkstra
Hi All, UHC (http://www.cs.uu.nl/wiki/UHC) has a Java backend. It works but further development currently does not have high priority. cheers, On 10 Nov, 2010, at 21:03 , aditya siram wrote: > Googling "haskell java integration" brings up a number of references > to Lambada. Is this project s

[Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Nils Schweinsberg
Hi, I'm having a few problems with cabals build-type "configure" on windows, especially with the packages "curl" and "pcre-light". Both fail either with: configure: error: curl libraries not found, so curl package cannot be built Configuring pcre-light-0.4... cabal: Missing depe

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Sjoerd Visscher
> The equality that people typically expect to hold for Haskell expressions is > that two such expressions are equal if they denote the same thing, as Max > said. Expressions with function type denote mathematical functions, and so if > we have something like: > > serialize :: (Integer -> Inte

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-11 Thread Simon Marlow
On 10/11/2010 17:52, Mitar wrote: Hi! On Wed, Nov 10, 2010 at 4:16 PM, Simon Marlow wrote: The right way to fix it is like this: Optimist. ;-) let run = unblock doSomething `catches` [ Handler (\(_ :: MyTerminateException) -> return ()), Handler (\(e :: S

[Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Nils Schweinsberg
Hi, I'm having a few problems with cabals build-type "configure" on windows, especially with the packages "curl" and "pcre-light". Both fail either with: * Missing C library: pcre ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Dan Doel
On Thursday 11 November 2010 4:25:46 am Thomas Davie wrote: > I don't think I agree, I didn't see a rule f == g => serialise f == > serialise g anywhere. That equal things can be substituted for one another is one of the fundamental ideas of equality (the other is that anything is equal to itself

Re: [Haskell-cafe] Splittable random numbers

2010-11-11 Thread Richard Senington
I got hold of, and looked through the paper suggested in the root of this thread "Pseudo random trees in Monte-Carlo ", and based upon this I have thrown together a version of the binary tree based random number generator suggested. I would like t

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Max Rabkin
On Thu, Nov 11, 2010 at 11:25, Bob wrote: > I don't think I agree, I didn't see a rule f == g => serialise f == serialise > g anywhere. The rule a == b => f a == f b is called referential transparency (for denotational equality, not Eq) and is (perhaps the most important) part of what is meant b

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Gábor Lehel
2010/11/11 Gábor Lehel : > I agree with the people who want to decouple the dot-syntax from TDNR > itself. To quote myself from the publicly-editable wiki page: > > "This might be a really dumb question, but is there any reason TDNR > needs to be tied to a new syntax for function application? It se

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Gábor Lehel
I agree with the people who want to decouple the dot-syntax from TDNR itself. To quote myself from the publicly-editable wiki page: "This might be a really dumb question, but is there any reason TDNR needs to be tied to a new syntax for function application? It seems strange to me to have one synt

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Thomas Davie
On 11 Nov 2010, at 08:36, Luke Palmer wrote: > On Thu, Nov 11, 2010 at 12:53 AM, Jesse Schalken > wrote: >> I have had a look at hs-plugins, but it is unclear how to derive a simple >> pair of functions `(a -> b) -> ByteString` and `ByteString -> Either >> ParseError (a -> b)`, for example, from

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Stephen Tetley
> If not Haskell, are there any languages which provide a simple serialization > and deserialization of functions? Napier88 was a persistent language that also had higher-order functions. I've no experience other than reading about it but as its persistence was "orthogonal persistence" I'd expect

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Alberto G. Corona
nstance Read (F a) where read str= eval str >>= F str sorry 2010/11/11 Alberto G. Corona > There are some straighforward tricks using the package eval (or hint)l. > > This is more or less the idea in pseudocode: > > type FuncExpr= String > > data F a = F FuncExpr a > > apply (F _ f) x= f x > >

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Alberto G. Corona
There are some straighforward tricks using the package eval (or hint)l. This is more or less the idea in pseudocode: type FuncExpr= String data F a = F FuncExpr a apply (F _ f) x= f x instance Show (F a) where show (F str _)= str instance Read (F a) where read (F str f)= eval f >>= F str 2

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Luke Palmer
On Thu, Nov 11, 2010 at 1:41 AM, Luke Palmer wrote: > On Thu, Nov 11, 2010 at 1:34 AM, John Lask wrote: >> On 11/11/2010 5:21 PM, Ketil Malde wrote: >>> >>> "Richard O'Keefe"  writes: >>> > it is often desirable to have the same field names > for many records in the same module. >>> >> >>

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-11 Thread Luke Palmer
On Thu, Nov 11, 2010 at 1:34 AM, John Lask wrote: > On 11/11/2010 5:21 PM, Ketil Malde wrote: >> >> "Richard O'Keefe"  writes: >> it is often desirable to have the same field names for many records in the same module. >> > > very much so, this is currently possible, with the restriction

  1   2   >