Re: [Haskell-cafe] Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-20 Thread ajb
G'day all. Quoting José Romildo Malaquias j.romi...@gmail.com: I am writing here to ask suggestions on how to annotate an ast with types (or any other information that would be relevant in a compiler phase) in Haskell. This might help:

Re: [Haskell-cafe] Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-20 Thread José Pedro Magalhães
Hi José, 2010/7/19 José Romildo Malaquias j.romi...@gmail.com I am writing here to ask suggestions on how to annotate an ast with types (or any other information that would be relevant in a compiler phase) in Haskell. As an example, consider the simplified ast types: data Exp =

[Haskell-cafe] ANNOUNCE: AngloHaskell 2010 - CALL FOR TALKS

2010-07-20 Thread Derek Wright
AngloHaskell 2010 - ANNOUNCEMENT and CALL FOR TALKS AngloHaskell 2010 - 5th Annual Haskell Meeting in England Friday September 10th and Saturday September 11th, 2010 Microsoft Research, Cambridge, UK http://www.haskell.org/haskellwiki/AngloHaskell/2010 [Please note the change of date from

[Haskell-cafe] Re: Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-20 Thread oleg
Jose' Romildo Malaquias wrote: I am writing here to ask suggestions on how to annotate an ast with types (or any other information that would be relevant in a compiler phase) in Haskell. There is also a general way of annotating AST post factum, described in

Re: [Haskell-cafe] Hackage survey

2010-07-20 Thread Ketil Malde
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes: I'd like to request some clarification of some of the questions: You might want to add a don't know or similar option, so that people don't have to fill in questions arbitrarily in the case they feel none of the answers match. 3. I use

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-20 Thread Ketil Malde
Christopher Done chrisd...@googlemail.com writes: Sadly nobody has the time nor inclination to do proper web development and actually test designs and get feedback, so I suppose we're working with the time we've got. At least with theme support, we can write a load of themes, and then

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-20 Thread Ketil Malde
Don Stewart d...@galois.com writes: (Looking at http://code.haskell.org/haskell-platform/download-website) * The three columns at the bottom overlap! Perhaps this is a valid case for a table rather than three divs and CSS layout. Agreed and implemented. That was easier! Scaling is still a

[Haskell-cafe] Re: Hackage survey

2010-07-20 Thread Sylvain Le Gall
I give again the survey URL: http://polldaddy.com/s/2C49D15023CB88C6 On 20-07-2010, Ketil Malde ke...@malde.org wrote: Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes: I'd like to request some clarification of some of the questions: You might want to add a don't know or similar

Re: [Haskell-cafe] Re: Hackage survey

2010-07-20 Thread Christopher Done
Do you value libraries/tools that are shipped through Hackage? * Yes, I always use only libraries/tools available on Hackage * Yes, but if a package is not available on Hackage, I will still use it I'm torn between the first two. I picked the first. If it's not available on Hackage, I

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Haskell 2010 Report (final)

2010-07-20 Thread Simon Marlow
On 15/07/2010 00:26, John Meacham wrote: On Wed, Jul 14, 2010 at 10:35:50AM +0100, Simon Marlow wrote: http://portal.acm.org/citation.cfm?id=773044 Ah, this paper looks very interesting, I was wondering if you had experimented with prefetching just ahead of the allocation pointer. Looks

[Haskell-cafe] Re: Hackage survey

2010-07-20 Thread Sylvain Le Gall
Hello, On 20-07-2010, Christopher Done chrisd...@googlemail.com wrote: Do you value libraries/tools that are shipped through Hackage? * Yes, I always use only libraries/tools available on Hackage * Yes, but if a package is not available on Hackage, I will still use it I'm torn

Re: [Haskell-cafe] Re: Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-20 Thread José Pedro Magalhães
Hi Oleg, From what I understand, you are using a list of integers to encode a path to a subterm. This is a practical and lightweight implementation, but less type-safe: it is easy to encode annotations that do not correspond to any value. Also, it cannot guarantee, with types alone, that every

[Haskell-cafe] BelHac: A Hackaton in Belgium, 5-7 November

2010-07-20 Thread Jasper Van der Jeugt
Hello all, We are very pleased to officially announce an international Hackaton/Get-together in Ghent, Belgium, on 5, 6 and 7 November 2010. If you are interested in attending, we have put some information on the wiki [1]. We will soon put up more details about transportation, accommodation and

Re: [Haskell-cafe] Talking to Java from Haskell?

2010-07-20 Thread aditya siram
Besides the FFI option, I know that Haskell has pretty good Lua bindings [1] and Lua has pretty good Java bindings [2] so perhaps the law of transitivity can work for you! -deech [1] http://hackage.haskell.org/package/hslua-0.2 [2] http://www.keplerproject.org/luajava/manual.html On Mon, Jul

[Haskell-cafe] Regex multiple matches

2010-07-20 Thread Omari Norman
Hi, How do I use Text.Regex.PCRE to get information on multiple matches? For instance, in ghci I get this error message: Prelude Text.Regex.PCRE foo =~ o :: [(Int,Int)] interactive:1:0: No instance for (RegexContext Regex [Char] [(Int, Int)]) arising from a use of `=~' at

[Haskell-cafe] seeking guideline re modules and stacks of State Monad Transformers

2010-07-20 Thread Ali Razavi
Hi, I am working on a project that features a few modules with inter-dependent states. It is expected that some of the modules import and use some of the stateful functions from other modules, and simultaneously, need to manage the state of their own. I need to make a design choice as to whether

Re: [Haskell-cafe] Regex multiple matches

2010-07-20 Thread Omari Norman
How do I use Text.Regex.PCRE to get information on multiple matches? For instance, in ghci I get this error message: Prelude Text.Regex.PCRE foo =~ o :: [(Int,Int)] Solved; do getAllMatches (foo =~ o) :: [(Int, Int)] ___ Haskell-Cafe mailing list

[Haskell-cafe] HTTP Redirect Error

2010-07-20 Thread aditya siram
Hi all, I am trying to simply download a web page using the HTTP library. It works fine with http://www.google.com; but a redirecting page like http://gmail.com; creates an error. Code is at http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27864#a27864. Thanks , -deech

Re: [Haskell-cafe] Regex multiple matches

2010-07-20 Thread David McBride
It is even simpler than that. The type determines the return value. axxfayyf =~ a..f :: Bool True axxfayyf =~ a..f :: Int 2 axxfayyf =~ a..f :: String axxf axxfayyf =~ a..f :: [[String]] [[axxf],[ayyf]] axxfayyf =~ a..f :: [MatchArray] [array (0,0) [(0,(0,4))],array (0,0) [(0,(4,4))]]

[Haskell-cafe] HTTP Redirect With HTTPS Rejected

2010-07-20 Thread aditya siram
The problem is that any page that that responds with 301.302,303 or 307 and redirects to an https is rejected by the library. The code that does the rejection is in Network.Browser on line 865. It only accepts http:. Why was this design decision made? It makes it impossible for me to use this

Re: [Haskell-cafe] Regex multiple matches

2010-07-20 Thread David McBride
Nevermind I see that you already knew that. But it is very cool anyways, I'm totally going to use regexes more often now that I've discovered it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] HTTP Redirect With HTTPS Rejected

2010-07-20 Thread Thomas DuBuisson
You should be CCing the author and creator (different people) of the library. Not everyone in the Haskell universe is subscribed to -cafe or any other ML. Cheers, Thomas On Tue, Jul 20, 2010 at 1:49 PM, aditya siram aditya.si...@gmail.com wrote: The problem is that any page that that responds

Re: [Haskell-cafe] HTTP Redirect With HTTPS Rejected

2010-07-20 Thread Thomas DuBuisson
Sorry, I ment to say CC the maintainer and the author if that wasn't obvious. Thomas On Tue, Jul 20, 2010 at 2:00 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: You should be CCing the author and creator (different people) of the library.  Not everyone in the Haskell universe is

Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-20 Thread John Goerzen
On 07/07/2010 03:22 PM, Don Stewart wrote: And you have to be wary about the license of HDBC (LGPL) if you want to use the package in software you redistribute (though this is rarely the case for database apps, I'm guessing). Satisfying the linking requirements with GHC -O2 are non-trivial,

[Haskell-cafe] src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-20 Thread Alexander Kotelnikov
Hello. I decided to run a couple of test XML-RPC applications using haxr. Everything worked fine while responces from my (actually, other people's) server were something relatively small (a number, a line), but with larger responces (starting around couple of kilobytes) my applications began to

Re: [Haskell-cafe] Re: Problem with reloading modules in GHC API

2010-07-20 Thread Andy Stewart
Hongmin Fan hongmin.fan.li...@gmail.com writes: Thanks Andy! Yes, I do need the second approach you listed here. I think the plugin package actually uses GHC API to load too. My problem here is more technical than theoretical. The type safety isn't the primary issue for me, because I'm

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-20 Thread Tom Hawkins
On Mon, Jul 19, 2010 at 11:54 AM, Stephen Tetley stephen.tet...@gmail.com wrote: Hi Tom This will the job for a UserHooks - probably preBuild? - see Distribution.Simple.UserHooks. postConf - Hook to run after configure command preBuild - Hook to run before build command. Second arg

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-20 Thread Rogan Creswick
On Tue, Jul 20, 2010 at 8:50 PM, Tom Hawkins tomahawk...@gmail.com wrote: Thanks.  I tried this, but it appears cabal-install ignores the Setup.hs file.  The only way I could get it to take is if I run 'runhaskell Setup.hs configure' directly.  I always assumed cabal-install runs Setup.hs

Re: [Haskell-cafe] A question about State Monad and Monad in general

2010-07-20 Thread C K Kashyap
Thanks Aditya...I think that is what I am looking for. On Mon, Jul 19, 2010 at 10:40 PM, aditya siram aditya.si...@gmail.comwrote: Sorry, the previous code does not compile. It should be: replace :: Int - [IORef (Int,Int,Int)] - (Int,Int,Int) - IO () replace index pixels new_val = do

Re: [Haskell-cafe] src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-20 Thread Antoine Latter
On Wed, Jul 21, 2010 at 1:19 AM, Alexander Kotelnikov sa...@myxomop.com wrote: Hello. I decided to run a couple of test XML-RPC applications using haxr. Everything worked fine while responces from my (actually, other people's) server were something relatively small (a number, a line), but

[Haskell-cafe] lambda terms in which the variables are positions in lambda terms

2010-07-20 Thread Greg Meredith
Dear Haskellians, The following code may provide some amusement. i offer a free copy of Barwise's Vicious Circles to the first person to derive deBruijn indices from this presentation. Best wishes, --greg -- -*- mode: Haskell;-*- -- Filename:Term.hs -- Authors: lgm -- Creation:Tue

Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-20 Thread Michael Snoyman
On Wed, Jul 21, 2010 at 12:20 AM, John Goerzen jgoer...@complete.orgwrote: On 07/07/2010 03:22 PM, Don Stewart wrote: And you have to be wary about the license of HDBC (LGPL) if you want to use the package in software you redistribute (though this is rarely the case for database apps, I'm

[Haskell-cafe] recommendation for (best) sqlite3 bindings

2010-07-20 Thread Gour
Hello! We are looking for recommendation which Haskell bindings for sqlite3 to use for destkop GUI app where we want, among other things to store *.png and/or *.jpg images. (Yeah, I know about the hint to store iamges in the filesystem and just store filepaths in the db, but for portability

Re: [Haskell-cafe] recommendation for (best) sqlite3 bindings

2010-07-20 Thread Michael Snoyman
On Wed, Jul 21, 2010 at 7:54 AM, Gour g...@gour-nitai.com wrote: Hello! We are looking for recommendation which Haskell bindings for sqlite3 to use for destkop GUI app where we want, among other things to store *.png and/or *.jpg images. (Yeah, I know about the hint to store iamges in the

[Haskell-cafe] On documentation

2010-07-20 Thread Richard O'Keefe
I'm giving some lectures this week about how to _read_ programs, and I've had some things to say about JavaDoc and wondered whether to show some examples of Haddock. I took a certain library that has been mentioned recently in this mailing list. (I shall not identify it. The author deserves

Re: [Haskell-cafe] On documentation

2010-07-20 Thread Ivan Miljenovic
On 21 July 2010 15:28, Richard O'Keefe o...@cs.otago.ac.nz wrote: I'm giving some lectures this week about how to _read_ programs, and I've had some things to say about JavaDoc and wondered whether to show some examples of Haddock. I took a certain library that has been mentioned recently in