RE: [Haskell-cafe] Haskell newbie indentation query.

2008-10-17 Thread Ramaswamy, Vivek
Thanks Jules and Daniel. That was very helpful. Regards -Vivek Ramaswamy- -Original Message- From: Jules Bean [mailto:[EMAIL PROTECTED] Sent: 15 October 2008 18:19 To: Ramaswamy, Vivek Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell newbie indentation query.

Re: [Haskell-cafe] Re: What I wish someone had told me...

2008-10-17 Thread Paul Johnson
Derek Elkins wrote: All you need is a T-shirt: http://www.cafepress.com/skicalc Or http://www.cafepress.com/l_revolution Paul. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Terminal-like Application Design

2008-10-17 Thread allan
Hi Jeff It sounds like maybe you just want an application that works a bit like 'cabal'. So with cabal the first argument is taken as the 'command' and then the rest are based on that: cabal build --some other --options --which may --or --may --not have --arguments Yi has a simple template for

Re: [Haskell-cafe] Re: Ubuntu Haskell

2008-10-17 Thread Magnus Therning
On Thu, Oct 16, 2008 at 8:12 PM, Duncan Coutts [EMAIL PROTECTED] wrote: On Tue, 2008-10-14 at 11:25 +0100, Magnus Therning wrote: Playing the devil's advocate I'd say that cabal (not the library Cabal, but the tool cabal in cabal-install) is only needed on systems with pacakge managers that

Re: [Haskell-cafe] Terminal-like Application Design

2008-10-17 Thread Magnus Therning
2008/10/17 allan [EMAIL PROTECTED]: Hi Jeff It sounds like maybe you just want an application that works a bit like 'cabal'. So with cabal the first argument is taken as the 'command' and then the rest are based on that: cabal build --some other --options --which may --or --may --not

Re: [Haskell-cafe] [fun] HaskellDB Talk trailer

2008-10-17 Thread Bjorn Bringert
On Fri, Oct 17, 2008 at 1:54 AM, Don Stewart [EMAIL PROTECTED] wrote: kyagrd: There is an impressive HaskellDB Talk trailer on the web. http://www.vimeo.com/1983774 Cheers to the HaskellDB developers :-) AWESOME! Trailers for talks, eh? The bar has been raised. -- Don Sweet! There

[Haskell-cafe] Invalid declaration names in TH that typecheck

2008-10-17 Thread Sean Leather
[I posted this on the Template Haskell list, but nobody seemed interested. Thus, I'm re-posting it here for higher coverage.] Apparently, I can create a function declaration (FunD) with a name containing an invalid sequence of characters. It passes typechecking and compiles. It even shows up in

[Haskell-cafe] howto mix - within do?

2008-10-17 Thread Larry Evans
The attached code produces error: -- cut here -- runghc -dcore-lint do_with_assignment.proto.hs do_with_assignment.proto.hs:30:2: Couldn't match expected type `[]' against inferred type `IO' Expected type: [t] Inferred type: IO () In the expression: putStr v0= In a 'do'

[Haskell-cafe] OPPS, missing attachment (was Re: howto mix - within do?

2008-10-17 Thread Larry Evans
On 10/17/08 07:39, Larry Evans wrote: The attached code produces error: -- cut here -- [snip] {- Purpose: Explore how to mix 'assignments' inside do. Motivation: Instead of: let { v0 = e0 ; v1 = e1 } in do { print v0 ; print v1 } which is

Re: [Haskell-cafe] Terminal-like Application Design

2008-10-17 Thread Dougal Stanton
2008/10/17 Magnus Therning [EMAIL PROTECTED]: I wanted to throw in another idea, something I didn't come up with myself but used in omnicodec[1]. Now I don't remember where I picked up the idea: This method is described in

Re: [Haskell-cafe] OPPS, missing attachment (was Re: howto mix - within do?

2008-10-17 Thread Martijn van Steenbergen
Every statement in a do-expression has to be in the same monad. You are mixing the list monad (v0 - [999]) with the IO monad (putStr v0=). Instead of v0 - [999] try: let v0 = [999] Hope this helps, Martijn. Larry Evans wrote: On 10/17/08 07:39, Larry Evans wrote: The attached

Re: [Haskell-cafe] howto mix - within do?

2008-10-17 Thread Dougal Stanton
On Fri, Oct 17, 2008 at 1:39 PM, Larry Evans [EMAIL PROTECTED] wrote: do_with_assignment.proto.hs:30:2: Couldn't match expected type `[]' against inferred type `IO' Expected type: [t] Inferred type: IO () In the expression: putStr v0= In a 'do' expression: putStr v0=

Re: [Haskell-cafe] OPPS, missing attachment (was Re: howto mix - within do?

2008-10-17 Thread Daniel Fischer
Am Freitag, 17. Oktober 2008 14:42 schrieb Larry Evans: On 10/17/08 07:39, Larry Evans wrote: The attached code produces error: -- cut here -- [snip] {- Purpose: Explore how to mix 'assignments' inside do. Motivation: Instead of: let { v0 = e0 ; v1 = e1

Re: [Haskell-cafe] List as input

2008-10-17 Thread leledumbo
So, what's the solution? This one: (l::[Ord]) - readLn doesn't work (because Ord isn't a type constructor). It doesn't even comply to Haskell 98 standard. I want to be able to read any list of ordered elements. -- View this message in context:

Re: [Haskell-cafe] List as input

2008-10-17 Thread Luke Palmer
On Fri, Oct 17, 2008 at 7:21 AM, leledumbo [EMAIL PROTECTED] wrote: So, what's the solution? This one: (l::[Ord]) - readLn doesn't work (because Ord isn't a type constructor). It doesn't even comply to Haskell 98 standard. I want to be able to read any list of ordered elements. What

Re: [Haskell-cafe] List as input

2008-10-17 Thread Dougal Stanton
On Fri, Oct 17, 2008 at 2:21 PM, leledumbo [EMAIL PROTECTED] wrote: So, what's the solution? This one: (l::[Ord]) - readLn doesn't work (because Ord isn't a type constructor). It doesn't even comply to Haskell 98 standard. I want to be able to read any list of ordered elements. I hope to

Re: [Haskell-cafe] List as input

2008-10-17 Thread Ryan Ingram
I can't think of a language that lets you do this; that is, allow you to input a list of any type as text. Some languages effectively encode the types in the parsing, for example in LISP, you know that 'foo is a symbol. It has a very limited set of data types and new types are described entirely

Re: [Haskell-cafe] List as input

2008-10-17 Thread David Leimbach
On Fri, Oct 17, 2008 at 6:21 AM, leledumbo [EMAIL PROTECTED]wrote: So, what's the solution? This one: (l::[Ord]) - readLn doesn't work (because Ord isn't a type constructor). It doesn't even comply to Haskell 98 standard. I want to be able to read any list of ordered elements. The

[Haskell-cafe] Implementing pi-calculus using STM

2008-10-17 Thread Edsko de Vries
Hi, (Note: assumes knowledge of pi-calculus.) I am playing with writing a simple interpreter for the pi-calculus using STM. The implementation of most of the operators of the pi- calculus is straightforward, but I am unsure on how to implement the replication operator. The interpretation

Re: [Haskell-cafe] Monadic Floating Point [was: Linking and unsafePerformIO]

2008-10-17 Thread Ariel J. Birnbaum
It is an interesting question: can IEEE floating point be done purely while preserving the essential features. I've not looked very far so I don't know how far people have looked into this before. Not sure. My doubts are mainly on interference between threads. If a thread can keep its FP state

[Haskell-cafe] Re: OPPS, missing attachment (was Re: howto mix - within do?

2008-10-17 Thread Larry Evans
On 10/17/08 08:12, Daniel Fischer wrote: Thanks very much Daniel. Am Freitag, 17. Oktober 2008 14:42 schrieb Larry Evans: On 10/17/08 07:39, Larry Evans wrote: The attached code produces error: -- cut here -- [snip] {- Purpose: Explore how to mix 'assignments' inside do. Motivation:

Re: [Haskell-cafe] Invalid declaration names in TH that typecheck

2008-10-17 Thread Brandon S. Allbery KF8NH
On 2008 Oct 17, at 7:33, Sean Leather wrote: Apparently, I can create a function declaration (FunD) with a name containing an invalid sequence of characters. It passes typechecking and compiles. It even shows up in GHCi! This may be a feature. Consider that internal functions use # as an

Re: [Haskell-cafe] Re: OPPS, missing attachment (was Re: howto mix - within do?

2008-10-17 Thread Daniel Fischer
Am Freitag, 17. Oktober 2008 17:56 schrieb Larry Evans: On 10/17/08 08:12, Daniel Fischer wrote: At first, the |let v = e| combination looked best (less typing). However, my actual e0 was more complicated: array_complete [ Expr == Op0 GramOne , Term == Op0 GramOne

[Haskell-cafe] Temlpate Haskell: [d| ... |]

2008-10-17 Thread Achim Schneider
[d| ... |], where the ... is a list of top-level declarations; the quotation has type Q [Dec]. (http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.html) Can someone elaborate on what a list means here? Neither declarations = [d| foo = bar bar = foo |] nor

Re: [Haskell-cafe] Temlpate Haskell: [d| ... |]

2008-10-17 Thread Philip Weaver
On Fri, Oct 17, 2008 at 9:26 AM, Achim Schneider [EMAIL PROTECTED] wrote: [d| ... |], where the ... is a list of top-level declarations; the quotation has type Q [Dec]. ( http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.html ) Can someone elaborate on what a list

[Haskell-cafe] Re: What I wish someone had told

2008-10-17 Thread John Lato
Richard O'Keefe wrote: On 17 Oct 2008, at 9:53 am, Daryoush Mehrtash wrote: So does this mean that the reason for complexity of generics is the Java inheritance? No. The reason for the complexity of generics in Java is that they weren't designed into the language in the first place. It

[Haskell-cafe] Re: Temlpate Haskell: [d| ... |]

2008-10-17 Thread Achim Schneider
Philip Weaver [EMAIL PROTECTED] wrote: On Fri, Oct 17, 2008 at 9:26 AM, Achim Schneider [EMAIL PROTECTED] wrote: [d| ... |], where the ... is a list of top-level declarations; the quotation has type Q [Dec]. (

[Haskell-cafe] Re: Pandoc questions

2008-10-17 Thread Andrew Coppin
John MacFarlane wrote: +++ Andrew Coppin [Oct 12 08 11:21 ]: There doesn't seem to be any option to make Pandoc produce actual MathML output. Is there a reason for this? 1. Nobody has written the LaTeX - MathML code yet, and I've been too lazy. Anyone who is interested in doing this

Re: [Haskell-cafe] Re: Temlpate Haskell: [d| ... |]

2008-10-17 Thread Robert Greayer
--- On Fri, 10/17/08, Achim Schneider [EMAIL PROTECTED] wrote: declarations = [d| foo = bar bar = foo |] -fth doesn't make a difference here, I'm using -XTemplateHaskell with ghc 6.8.3 The following lines, verbatim, pasted into a file, work for me with 6.8.3 with no

[Haskell-cafe] Re: Temlpate Haskell: [d| ... |]

2008-10-17 Thread Achim Schneider
Robert Greayer [EMAIL PROTECTED] wrote: --- On Fri, 10/17/08, Achim Schneider [EMAIL PROTECTED] wrote: declarations = [d| foo = bar bar = foo |] -fth doesn't make a difference here, I'm using -XTemplateHaskell with ghc 6.8.3 The following lines, verbatim, pasted

[Haskell-cafe] Troubles getting isA of ArrowIf from HXT 8.10 to work as expected

2008-10-17 Thread Corey O'Connor
I'm attempting to use ifA to conditionalize generated XHTML. ifA (arr test_status arr (/= Running)) (mkelem a [attr href (arr test_log_URL mkText)] [txt log]) (mkelem a [attr href (arr test_log_URL mkText)] [txt no log]) The arrow type at

[Haskell-cafe] How to deal with pointers to pointers in the FFI

2008-10-17 Thread Jefferson Heard
I have the following functions in C: OGRErr OGR_G_CreateFromWkb (unsigned char *, OGRSpatialReferenceH, OGRGeometryH *, int) OGRErr OGR_G_CreateFromWkt (char **, OGRSpatialReferenceH, OGRGeometryH *) voidOGR_G_DestroyGeometry (OGRGeometryH) OGRGeometryHOGR_G_CreateGeometry

Re: [Haskell-cafe] How to deal with pointers to pointers in the FFI

2008-10-17 Thread Jake McArthur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jefferson Heard wrote: I have the following functions in C: OGRErrOGR_G_CreateFromWkb (unsigned char *, OGRSpatialReferenceH, OGRGeometryH *, int) OGRErrOGR_G_CreateFromWkt (char **, OGRSpatialReferenceH, OGRGeometryH *) void

Re: [Haskell-cafe] How to deal with pointers to pointers in the FFI

2008-10-17 Thread Jefferson Heard
Sadly, nothing so awesome... OGR is part of GDAL, an open-source geographic information system suite. On Fri, Oct 17, 2008 at 3:22 PM, Jake McArthur [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jefferson Heard wrote: I have the following functions in C: OGRErr

Re: [Haskell-cafe] How to deal with pointers to pointers in the FFI

2008-10-17 Thread Jake McArthur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jefferson Heard wrote: Sadly, nothing so awesome... OGR is part of GDAL, an open-source geographic information system suite. On Fri, Oct 17, 2008 at 3:22 PM, Jake McArthur [EMAIL PROTECTED] wrote: Are these Ogre3D functions? If so, I hope you

[Haskell-cafe] ANNOUNCE: Glob 0.1, globbing library

2008-10-17 Thread Matti Niemenmaa
Greetings to all, I hereby announce the release of Glob 0.1, a small library for glob-matching purposes based on a subset of zsh's syntax. Web page at: http://iki.fi/matti.niemenmaa/glob/index.html Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Glob Simple example: match

[Haskell-cafe] Re: How to deal with pointers to pointers in the FFI

2008-10-17 Thread Ben Franksen
Jefferson Heard wrote: I have the following functions in C: OGRErrOGR_G_CreateFromWkb (unsigned char *, OGRSpatialReferenceH, OGRGeometryH *, int) OGRErrOGR_G_CreateFromWkt (char **, OGRSpatialReferenceH, OGRGeometryH *) void OGR_G_DestroyGeometry (OGRGeometryH)

[Haskell-cafe] Re: Compiling regex-posix-0.93.2 on windows

2008-10-17 Thread Chris Kuklewicz
I am not sure what is going wrong. I have not been using Haskell on windows. I am also copying this reply to haskell-cafe and libaries mailing lists. Does anyone know? Parnell Flynn wrote: I am having a terrible time compiling the 0.93.2 version of the regex-posix library on windows XP.

[Haskell-cafe] Fwd: [Haskell-beginners] HaXml.SAX successfully parses a malformed XML document

2008-10-17 Thread David Frey
I asked this question on the haskell-beginners list, but I didn't get a response, so I am forwarding it on to the cafe list. David --- Original Message --- Date: 10/16/2008 From: David Frey [EMAIL PROTECTED] Subject: [Haskell-beginners] HaXml.SAX successfully parses a malformed XML document

[Haskell-cafe] Glut using freeglut and non starndard header / lib location?

2008-10-17 Thread Marc Weber
Which is the way to install the glut library with non standard header / lib location? I've tried setting CFLAGS before running ./configure ./setup configure and adding the include directory this way include-dirs: include, /nix/store/rz4nfm5qcrjrk0jsr1lxnjwamgxmgip8-freeglut-2.4.0/include

[Haskell-cafe] package question/problem

2008-10-17 Thread Galchin, Vasili
Hello, I am trying to cabal install HSQL. I am using ghc 6.8.2. I get the following error about a non-visible/hidden package (old-time-1.0.0.0): [EMAIL PROTECTED]:~$ cabal install hsql Resolving dependencies... 'hsql-1.7' is cached. [1 of 1] Compiling Main ( Setup.lhs,

[Haskell-cafe] mysql server on Linux

2008-10-17 Thread Galchin, Vasili
Hello, I want to use the mysql server (mysqld) on Linux. What Haskell packages must I install in order to write a Haskell mysql package?? Thank you, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] package question/problem

2008-10-17 Thread Marc Weber
Hi Vasili, have a look at all options of ghc-pkg. There is one command to hide a package. Hidden packages will be shown by ghc-pkg list in parenthesis. The second way to hide packages is passing a special option to ghc (you can look it up in the ghc documentation or by running ./setup build -v3).

Re: [Haskell-cafe] mysql server on Linux

2008-10-17 Thread Marc Weber
On Fri, Oct 17, 2008 at 06:27:43PM -0500, Galchin, Vasili wrote: Hello, I want to use the mysql server (mysqld) on Linux. What Haskell packages must I install in order to write a Haskell mysql package?? What do you mean by mysql package? Do you want to write either an application

[Haskell-cafe] Re: Pandoc questions

2008-10-17 Thread John MacFarlane
1. Nobody has written the LaTeX - MathML code yet, and I've been too lazy. Anyone who is interested in doing this should get in touch. Well, I'd certainly be interested. I use mathematics *a lot* in my writing. Presumably modifying a large program like Pandoc is intractably

Re: [Haskell-cafe] Implementing pi-calculus using STM

2008-10-17 Thread Derek Elkins
On Fri, 2008-10-17 at 14:56 +0100, Edsko de Vries wrote: Hi, (Note: assumes knowledge of pi-calculus.) I am playing with writing a simple interpreter for the pi-calculus using STM. The implementation of most of the operators of the pi- calculus is straightforward, but I am unsure on