Re: [Haskell-cafe] Data.ByteString vs Data.ByteString.Lazy vs Data.ByteString.Char8

2008-12-03 Thread Galchin, Vasili
based on ghc-pkg list in my global ghc install I have bytestring-0.9.0.1 in my local ghc install I have bytestring-0.9.1.0 this difference of versions I strongly think is causing my problems.. When I run cabal install bytestring from the CLI, I get resolving differences If my

Re: [Haskell-cafe] Data.ByteString vs Data.ByteString.Lazy vs Data.ByteString.Char8

2008-12-03 Thread Ketil Malde
Galchin, Vasili [EMAIL PROTECTED] writes: Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package binary-0.4.2 requires bytestring-0.9.0.1 package bio-0.3.4.1 requires bytestring-0.9.1.0 ah ha .. Ketil,

[Haskell-cafe] Re: Fun with type functions

2008-12-03 Thread Ashley Yakeley
Simon Peyton-Jones wrote: can you tell us about the most persuasive, fun application you've encountered, for type families or functional dependencies? I'm using them to provide witnesses to lenses. Given two lenses on the same base type, I want to compare them, and if

Re: [Haskell-cafe] What causes loop?

2008-12-03 Thread Janis Voigtlaender
Martin Hofmann wrote: I've already posted this mail on haskell-cafe, but apparently the subject suggested a too simple question, so I try it here again. I am picking up a discussion with the same topic from haskell-users on 8th November. Note that you have been sending to haskell-cafe again.

Re: [Haskell-cafe] What causes loop?

2008-12-03 Thread Janis Voigtlaender
Janis Voigtlaender wrote: Martin Hofmann wrote: I've already posted this mail on haskell-cafe, but apparently the subject suggested a too simple question, so I try it here again. I am picking up a discussion with the same topic from haskell-users on 8th November. Note that you have been

Re: [Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
Good morning, I wonder if it is possible to embed regular HTML code inside gitit (on 0.3.2) pages, such as java applets like the following. APPLET CODE = GHood.class ARCHIVE = GHood.jar WIDTH = 1100 HEIGHT = 400 ALT = you should see an instance of GHood here, as an applet PARAM NAME = eventSource

[Haskell-cafe] Cabal and Hat?

2008-12-03 Thread Magnus Therning
Is it possible to use cabal to build the files that hat would need to do tracing (i.e. .htx files)? /M -- Magnus Therning(OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe

[Haskell-cafe] Re: What causes loop?

2008-12-03 Thread Apfelmus, Heinrich
Martin Hofmann wrote: Thunks with reference on themselves was mentioned as main reason for loop. A safe recursive definition would be let x = Foo (x+1) However, if you leave out the constructor, let x = x + 1 you get a loop (or a deadlock). Are there any other reasons? A program

[Haskell-cafe] Re: What causes loop?

2008-12-03 Thread Martin Hofmann
I was not sure about it, so I just speculated. Anyway, thanks a lot. martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Data.ByteString vs Data.ByteString.Lazy vs Data.ByteString.Char8

2008-12-03 Thread Duncan Coutts
On Wed, 2008-12-03 at 01:52 -0600, Galchin, Vasili wrote: Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package binary-0.4.2 requires bytestring-0.9.0.1 package bio-0.3.4.1 requires bytestring-0.9.1.0

Re: [Haskell-cafe] ByteString web site papers

2008-12-03 Thread Duncan Coutts
On Tue, 2008-12-02 at 22:56 -0600, Galchin, Vasili wrote: Hello, http://www.cse.unsw.edu.au/~dons/fps.html Are the papers/slides still up-to-date for someone to get up-to-speed on ByteString motivation and implementation? Yes. Anything more recent? It links to the stream fusion paper

Re: [Haskell-cafe] Cabal and Hat?

2008-12-03 Thread Duncan Coutts
On Wed, 2008-12-03 at 09:36 +, Magnus Therning wrote: Is it possible to use cabal to build the files that hat would need to do tracing (i.e. .htx files)? No, but if you'd like to add support that'd be a great service to everyone. Duncan ___

Re: [Haskell-cafe] Problem building HXQ on Mac OS 10.5.5

2008-12-03 Thread Tobias Kräntzer
Hi, Am 03.12.2008 um 02:00 schrieb Gwern Branwen: I haven't looked at the source, so take this as off-the-cuff: try importing not Control.Exception but Control.OldException. changing Control.Exceptionto Control.OldException didn't work. But changing SomeException to Exception seems to solve

[Haskell-cafe] handles and foreign C functions

2008-12-03 Thread Andrea Rossato
Hello, suppose a simple C function like this: void printStuff(FILE *f) { fprintf (f, Hello World\n); } In order to use it I need to import fopen and pass to it a Ptr CFile: foreign import ccall unsafe fopen fopen :: CString - CString - IO (Ptr CFile) foreign import ccall unsafe fclose

[Haskell-cafe] gmp license == no commercial/closed source haskell software ??

2008-12-03 Thread Lionel Barret De Nazaris
I've just discovered the GMP license problem. (see http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes) From my understanding, the gmp is GPL, GHC statically links it on windows. As a consequence, any program compiled using GHC must be distributed under a GPL compatible license. In

Re: [Haskell-cafe] gmp license == no commercial/closed source haskell software ??

2008-12-03 Thread Don Stewart
lionel: I've just discovered the GMP license problem. (see http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes) From my understanding, the gmp is GPL, GHC statically links it on windows. As a consequence, any program compiled using GHC must be distributed under a GPL compatible

Re: [Haskell-cafe] gmp license == no commercial/closed source haskell software ??

2008-12-03 Thread Jonathan Cast
On Wed, 2008-12-03 at 15:36 +0100, Lionel Barret De Nazaris wrote: I've just discovered the GMP license problem. (see http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes) From my understanding, the gmp is GPL, GHC statically links it on windows. Lesser GPL:

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread John MacFarlane
+++ Hugo Pacheco [Dec 03 08 09:36 ]: Good morning, I wonder if it is possible to embed regular HTML code inside gitit (on 0.3.2) pages, such as java applets like the following. APPLET CODE = GHood.class ARCHIVE = GHood.jar WIDTH = 1100 HEIGHT = 400 ALT = you should see an

Re: [Haskell-cafe] handles and foreign C functions

2008-12-03 Thread Bulat Ziganshin
Hello Andrea, Wednesday, December 3, 2008, 5:09:21 PM, you wrote: How can I pass to printStuff a stdout FILE pointer? afair, stdout syntax used to import variables. it was discussed just a day or two ago :) -- Best regards, Bulatmailto:[EMAIL PROTECTED]

Re[2]: [Haskell-cafe] gmp license == no commercial/closed source haskell software ??

2008-12-03 Thread Bulat Ziganshin
Hello Don, Wednesday, December 3, 2008, 5:36:57 PM, you wrote: From my understanding, the gmp is GPL, GHC statically links it on windows. GMP is *LGPL*. Supporting this is trivial with a dynamically linked / DLL libgmp. the whole problem is that it links in statically, that reduces license

Re: [Haskell-cafe] gmp license == no commercial/closed source haskell software ??

2008-12-03 Thread Alex Sandro Queiroz e Silva
Hallo, Don Stewart wrote: Supporting this is trivial with a dynamically linked / DLL libgmp. With a statically linked one, it is also possible, since the API calls to libgmp are specified. Is it also possible? How? This shouldn't prevent commercial use -- lots of other companies

Re: [Haskell-cafe] handles and foreign C functions

2008-12-03 Thread Andrea Rossato
On Wed, Dec 03, 2008 at 07:08:00PM +0300, Bulat Ziganshin wrote: Hello Andrea, Wednesday, December 3, 2008, 5:09:21 PM, you wrote: How can I pass to printStuff a stdout FILE pointer? afair, stdout syntax used to import variables. it was discussed just a day or two ago :) you mean

Re[2]: [Haskell-cafe] handles and foreign C functions

2008-12-03 Thread Bulat Ziganshin
Hello Andrea, Wednesday, December 3, 2008, 7:23:20 PM, you wrote: either some error in the code (i neevr used this feature) or stdout may be defile by a macro. can you try to define function for it: FILE *out() {return stdout;} On Wed, Dec 03, 2008 at 07:08:00PM +0300, Bulat Ziganshin wrote:

Re: [Haskell-cafe] handles and foreign C functions

2008-12-03 Thread Andrea Rossato
Hello Bulat, On Wed, Dec 03, 2008 at 07:26:39PM +0300, Bulat Ziganshin wrote: either some error in the code (i neevr used this feature) or stdout may be defile by a macro. the second you said: /* C89/C99 say they're macros. Make them happy. */ (from stdio.h) can you try to define

Re: [Haskell-cafe] Problem building HXQ on Mac OS 10.5.5

2008-12-03 Thread Judah Jacobson
On Tue, Dec 2, 2008 at 9:49 AM, Tobias Kräntzer [EMAIL PROTECTED] wrote: Hi, I'm new to haskell and wonted to start tinkering a bit with this language, specifically with HXQ. I have installed ghc with macports. Now while building HXQ I get the following error: Main.hs:20:9: Not in

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
yes, I am talking about inserting HTML inside the wiki.Thanks, I will check on that and report back, hugo On Wed, Dec 3, 2008 at 3:44 PM, John MacFarlane [EMAIL PROTECTED] wrote: +++ Hugo Pacheco [Dec 03 08 09:36 ]: Good morning, I wonder if it is possible to embed regular HTML code

[Haskell-cafe] Gluing pipes

2008-12-03 Thread Matt Hellige
From time to time, I've wanted to have a more pleasant way of writing point-free compositions of curried functions. One might want to transform both the first and second arguments, for instance, or only the third argument, of a curried function. I've never known a (non-cryptic) way to do this.

Re: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-03 Thread Andrew Coppin
Brandon S. Allbery KF8NH wrote: On 2008 Dec 2, at 14:44, Andrew Coppin wrote: Regardless, it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I

Re: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-03 Thread Andrew Coppin
Jason Dusek wrote: Andrew Coppin [EMAIL PROTECTED] wrote: ...it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on

[Haskell-cafe] Projects that depend on the vty package?

2008-12-03 Thread Corey O'Connor
Hello, For further development of the vty package I'm really only paying attention to the requirements that fall out of the Yi project. Are there any other projects that depend on the vty package? In addition, the vty project has it's own wiki: http://trac.haskell.org/vty/ Right now there isn't

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
On a different level, I was trying the wiki on my laptop, but have now installed it in a remote server. However, with the same configurations, I can create users but not log in, it simply returns to the front page. It is hosted at http://haskell.di.uminho.pt:8080 It does not seem to be a

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
Solved, just something with my Safari cookies, sorry. On Wed, Dec 3, 2008 at 8:40 PM, Hugo Pacheco [EMAIL PROTECTED] wrote: On a different level, I was trying the wiki on my laptop, but have now installed it in a remote server. However, with the same configurations, I can create users but not

[Haskell-cafe] library to process zip files

2008-12-03 Thread Yuriy
On Thu, Dec 04, 2008 at 11:56:10AM +1300, Yuriy wrote: Hi, Is there any haskell library to work with ZIP file format? Thanks, Yuriy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] library to process zip files

2008-12-03 Thread Jeff Heard
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zip-archive On Wed, Dec 3, 2008 at 5:59 PM, Yuriy [EMAIL PROTECTED] wrote: On Thu, Dec 04, 2008 at 11:56:10AM +1300, Yuriy wrote: Hi, Is there any haskell library to work with ZIP file format? Thanks, Yuriy

[Haskell-cafe] is there something special about the Num instance?

2008-12-03 Thread Anatoly Yakovenko
module Test where --why does this work: data Test = Test class Foo t where foo :: Num v = t - v - IO () instance Foo Test where foo _ 1 = print $ one foo _ _ = print $ not one --but this doesn't? class Bar t where bar :: Foo v = t - v - IO () instance Bar Test where bar _ Test

Re: [Haskell-cafe] library to process zip files

2008-12-03 Thread Yuriy
Almost as fast as typing proper google query :) Thanks. On Wed, Dec 03, 2008 at 06:01:59PM -0500, Jeff Heard wrote: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zip-archive On Wed, Dec 3, 2008 at 5:59 PM, Yuriy [EMAIL PROTECTED] wrote: On Thu, Dec 04, 2008 at 11:56:10AM +1300,

Re: [Haskell-cafe] is there something special about the Num instance?

2008-12-03 Thread Yuriy
Numeric literals are special. Their type is (Num t) = t, so it can belong to any type that is instance of Num. Whereas Test belongs to Test type only so you cannot call bar on any instance of Foo. So your pattern constrains type signature of bar more then it is constrained by class

Re: [Haskell-cafe] is there something special about the Num instance?

2008-12-03 Thread Daniel Fischer
Am Donnerstag, 4. Dezember 2008 00:05 schrieb Anatoly Yakovenko: module Test where --why does this work: data Test = Test class Foo t where foo :: Num v = t - v - IO () instance Foo Test where foo _ 1 = print $ one foo _ _ = print $ not one --but this doesn't? class Bar t

Re: [Haskell-cafe] is there something special about the Num instance?

2008-12-03 Thread Ryan Ingram
Yes; I had a similar question, and it turns out Num is special, or rather, pattern matching on integer literals is special. See the thread http://www.nabble.com/Pattern-matching-on-numbers--td20571034.html The summary is that pattern matching on a literal integer is different than a regular

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
Hmm, I think I finally see the real problem. At some point when logged in, the session expires and the wiki prompts again for the login information. However, the cookies still assume we are logged in and do not allow me to log in again. The solution is to remove the cookies for the wiki server. I

Re: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-03 Thread Judah Jacobson
On Wed, Dec 3, 2008 at 11:53 AM, Andrew Coppin [EMAIL PROTECTED] wrote: Brandon S. Allbery KF8NH wrote: On 2008 Dec 2, at 14:44, Andrew Coppin wrote: Regardless, it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC,

Re: [Haskell-cafe] is there something special about the Num instance?

2008-12-03 Thread Anatoly Yakovenko
Thanks for your help. On Wed, Dec 3, 2008 at 3:47 PM, Ryan Ingram [EMAIL PROTECTED] wrote: Yes; I had a similar question, and it turns out Num is special, or rather, pattern matching on integer literals is special. See the thread

Re: [Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Anatoly Yakovenko
This is pretty cool. I was wondering how much work would it be for gitit to be able to use markdown from the comment sections in source files? It would be a really good way to manage documentation. Basically I would like to be able to point gitit at an existing git repo, and have it provide a

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread John MacFarlane
+++ Anatoly Yakovenko [Dec 03 08 17:03 ]: This is pretty cool. I was wondering how much work would it be for gitit to be able to use markdown from the comment sections in source files? It would be a really good way to manage documentation. Basically I would like to be able to point gitit

[Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Anatoly Yakovenko
On Wed, Dec 3, 2008 at 5:54 PM, John MacFarlane [EMAIL PROTECTED] wrote: +++ Anatoly Yakovenko [Dec 03 08 17:03 ]: This is pretty cool. I was wondering how much work would it be for gitit to be able to use markdown from the comment sections in source files? It would be a really good way to

Re: Re[2]: [Haskell-cafe] GHC on Fedora 10 - getMBlock: mmap: Permission denied

2008-12-03 Thread John D. Ramsdell
I had fun with SELinux when using Haskell for CGI programs. The default SELinux policy forbids CGI programs that execute code in their data segment. I had to write a policy module that allowed httpd_sys_script_t self:process execmem. Oh joy. John ___

Re: [Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Hugo Pacheco
I think that Anatoly was suggestion a bridge between markdown and haddock syntax. Of course gitit would read haddock-documented sources and generate different results than haddock itself (showing highlighted source code is the most significant). Being practical, this is very close to the

Re: [Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-03 Thread Anatoly Yakovenko
Being practical, this is very close to the markdownish literate haskell you are suggesting. hugo yea, i agree. But is there any way to generalize this to non haskell projects? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-03 Thread Don Stewart
andrewcoppin: Jason Dusek wrote: Andrew Coppin [EMAIL PROTECTED] wrote: ...it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen

Re: Re[2]: [Haskell-cafe] gmp license == no commercial/closed source haskell software ??

2008-12-03 Thread Jason Dusek
Bulat Ziganshin [EMAIL PROTECTED] wrote: Don wrote: Lionel wrote: From my understanding, the gmp is GPL, GHC statically links it on windows. GMP is *LGPL*. Supporting this is trivial with a dynamically linked / DLL libgmp. the whole problem is that it links in statically, that