Re: [Haskell-cafe] ghc panic when compiling blaze-builder

2010-11-20 Thread kyra
On 11/21/2010 3:20 AM, JosИ Romildo Malaquias wrote: When compiling blaze-builder-0.2.0.1 with ghc-7.0.1 on my ~amd64 gentoo system, I am getting the shown below. Any clues? Romildo [...] Building blaze-builder-0.2.0.1... [1 of 8] Compiling Blaze.ByteString.Builder.Internal ( Blaze/ByteStrin

[Haskell-cafe] Same compiled program behaving differently when called from ghci and shell

2010-11-20 Thread Bruno Damour
Hello, I have a very strange (for me) problem that I manage to reduce to this : I have a small program that reads a file with 1 only character (è = e8) The program is ftest2.hs : import IO import Data.Maybe tfind s = lookup (head s) $ zip ['\xe8', '\xde'] "12" main= do h<- rea

Re: [Haskell-cafe] Interactive OpenGL-based graphics and ghci?

2010-11-20 Thread Lyndon Maydwell
I've always had issues with GLUT under ghci. If GHC 7 fixes this it will make me happy :) On Sun, Nov 21, 2010 at 7:54 AM, Luke Palmer wrote: > On Sat, Nov 20, 2010 at 4:46 PM, Conal Elliott wrote: >> I'm trying to find some way to do interactive, OpenGL-based graphics in >> Haskell on Mac OS X.

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Albert Y. C. Lai
Most likely you also have the zlib package (cabal-install needs it), so let's use it. Attached therefore.hs import qualified Data.ByteString.Lazy as LB import Codec.Compression.GZip(decompress) import Network.URI(parseURI) import Network.HTTP url = "http://www.adorocinema.com/common/search/sear

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Yitzchak Gale
Albert Y. C. Lai wrote: > ...truncates when the web server chooses the identity encoding > The server chooses identity when > your request's Accept-Encoding field specifies identity or simply your > request has no Accept-Encoding field Excellent work! > My methodology of discovering and confirmin

Re: [Haskell-cafe] doesDirectoryExist is always returning False

2010-11-20 Thread Judah Jacobson
On Sat, Nov 20, 2010 at 6:55 AM, Marcelo Sousa wrote: > Hi, > I'm having currently a problem with System.Directory in my mac os. >   System Version: Mac OS X 10.6.5 >   Kernel Version: Darwin 10.5.0 > Prelude System.Directory> let dirTest = do {dir <- getCurrentDirectory; > doesDirectoryExist dir}

[Haskell-cafe] ghc panic when compiling blaze-builder

2010-11-20 Thread José Romildo Malaquias
When compiling blaze-builder-0.2.0.1 with ghc-7.0.1 on my ~amd64 gentoo system, I am getting the shown below. Any clues? Romildo [...] Building blaze-builder-0.2.0.1... [1 of 8] Compiling Blaze.ByteString.Builder.Internal ( Blaze/ByteString/Builder/Internal.hs, dist/build/Blaze/ByteString/Bui

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Albert Y. C. Lai
On 10-11-20 02:54 PM, José Romildo Malaquias wrote: In order to download a given web page, I wrote the attached program. The problem is that the page is not being full downloaded. It is being somehow intettupted. The specific website and url http://www.adorocinema.com/common/search/search_by_fi

Re: [Haskell-cafe] Interactive OpenGL-based graphics and ghci?

2010-11-20 Thread Luke Palmer
On Sat, Nov 20, 2010 at 4:46 PM, Conal Elliott wrote: > I'm trying to find some way to do interactive, OpenGL-based graphics in > Haskell on Mac OS X. > Does anyone here use GLUT or SDL on Mac OS X with ghci, or maybe an > alternative library? I was reading the GHC 7 release notes and saw this:

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Sterling Clover
On Nov 20, 2010, at 5:10 PM, Yitzchak Gale wrote: > José Romildo Malaquias wrote: >> Web browsers like Firefox and Opera does not seem to have the same >> problem with this web page. >> I would like to be able to download this page from Haskell. > > Hi Romildo, > > This web page serves the head

[Haskell-cafe] Interactive OpenGL-based graphics and ghci?

2010-11-20 Thread Conal Elliott
I'm trying to find some way to do interactive, OpenGL-based graphics in Haskell on Mac OS X. Does anyone here use GLUT or SDL on Mac OS X with ghci, or maybe an alternative library? Using ghci is very important to me, as my programs are pretty high-level and are often half-liners. I'm using gtk2hs

Re: [Haskell-cafe] category-extras clash with transformers

2010-11-20 Thread Ivan Lazar Miljenovic
On 21 November 2010 09:59, Tony Morris wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 21/11/10 08:41, Edward Z. Yang wrote: >> No, you're not totally screwed; you just need to bug >> xmonad-contrib and category-extras to fix their code. >> >> Edward > I am wondering if upgrading f

Re: [Haskell-cafe] category-extras clash with transformers

2010-11-20 Thread Tony Morris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21/11/10 08:41, Edward Z. Yang wrote: > No, you're not totally screwed; you just need to bug > xmonad-contrib and category-extras to fix their code. > > Edward I am wondering if upgrading from 6.12.1 to 6.12.3 will allow me to compile xmonad-contrib

Re: [Haskell-cafe] category-extras clash with transformers

2010-11-20 Thread Edward Z. Yang
No, you're not totally screwed; you just need to bug xmonad-contrib and category-extras to fix their code. Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] category-extras clash with transformers

2010-11-20 Thread Tony Morris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21/11/10 04:43, Ross Paterson wrote: > On Sat, Nov 20, 2010 at 10:58:44PM +1000, Tony Morris wrote: >> I have installed mtl-1.1.1.0 so that xmonad-contrib-0.9.1 would >> compile with GHC 6.12.1. >> http://permalink.gmane.org/gmane.comp.lang.haskell.

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Yitzchak Gale
José Romildo Malaquias wrote: > Web browsers like Firefox and Opera does not seem to have the same > problem with this web page. > I would like to be able to download this page from Haskell. Hi Romildo, This web page serves the head, including a lot of JavaScript, and the first few hundred bytes

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread José Romildo Malaquias
On Sat, Nov 20, 2010 at 10:26:49PM +0100, Daniel Fischer wrote: > On Saturday 20 November 2010 21:47:52, Don Stewart wrote: > > > 2010/11/20 José Romildo Malaquias : > > > > In order to download a given web page, I wrote the attached program. > > > > The problem is that the page is not being full d

Re: [Haskell-cafe] Re: Codec.Crypto.RSA question

2010-11-20 Thread Mathias Weber
The problem in this example is the use of Data.Binary. When using Data.ByteString.Lazy.Char8 instead, the problem does not exist. import qualified Codec.Crypto.RSA as Crypto import System.Random (mkStdGen) import Data.ByteString.Lazy.UTF8 (toString) import qualified Data.ByteString.Lazy.Char8 as C

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Daniel Fischer
On Saturday 20 November 2010 21:47:52, Don Stewart wrote: > > 2010/11/20 José Romildo Malaquias : > > > In order to download a given web page, I wrote the attached program. > > > The problem is that the page is not being full downloaded. It is > > > being somehow intettupted. > > > > > > Any clues

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Don Stewart
michael: > 2010/11/20 José Romildo Malaquias : > > In order to download a given web page, I wrote the attached program. The > > problem is that the page is not being full downloaded. It is being > > somehow intettupted. > > > > Any clues on how to solve this problem? > > My guess is that there's a

Re: [Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread Michael Snoyman
2010/11/20 José Romildo Malaquias : > In order to download a given web page, I wrote the attached program. The > problem is that the page is not being full downloaded. It is being > somehow intettupted. > > Any clues on how to solve this problem? My guess is that there's a character encoding issue

[Haskell-cafe] Downloading web page in Haskell

2010-11-20 Thread José Romildo Malaquias
In order to download a given web page, I wrote the attached program. The problem is that the page is not being full downloaded. It is being somehow intettupted. Any clues on how to solve this problem? Romildo module Main where import Network.HTTP (getResponseBody, getRequest, simpleHTTP) openUR

Re: [Haskell-cafe] category-extras clash with transformers

2010-11-20 Thread Ross Paterson
On Sat, Nov 20, 2010 at 10:58:44PM +1000, Tony Morris wrote: > I have installed mtl-1.1.1.0 so that xmonad-contrib-0.9.1 would compile > with GHC 6.12.1. > http://permalink.gmane.org/gmane.comp.lang.haskell.xmonad/10603 > > Then I tried to installed category-extras-0.53.5, which clashed with > tra

Re: [Haskell-cafe] Re: Codec.Crypto.RSA question

2010-11-20 Thread Dominic Steintiz
Charles-Pierre Astolfi wrote: > Here's a working example: > > import qualified Codec.Crypto.RSA as Crypto > import System.Random (mkStdGen) > import Data.Binary (encode) > import Data.ByteString.Lazy.UTF8 (toString) > > n = 1024 > (pubKey,privKey,_) = Crypto.generateKeyPair (mkStdGen n) n > > encry

[Haskell-cafe] doesDirectoryExist is always returning False

2010-11-20 Thread Marcelo Sousa
Hi, I'm having currently a problem with System.Directory in my mac os. System Version: Mac OS X 10.6.5 Kernel Version: Darwin 10.5.0 Prelude System.Directory> let dirTest = do {dir <- getCurrentDirectory; doesDirectoryExist dir} Prelude System.Directory> dirTest False I notice

[Haskell-cafe] Re: Re: Reply-To: Header in Mailinglists (was: About "Fun with type functions" example)

2010-11-20 Thread Maciej Piechotka
On Fri, 2010-11-19 at 15:25 +0100, Arnaud Bailly wrote: > I personnally use most of the time gmail, so I don't have access to a > Reply-To-List feature (or do I?). > I usually do Reply-to-all which I think is as I guess most mailers > remove duplicate mails. Am I right? > > Arnaud As message have

[Haskell-cafe] category-extras clash with transformers

2010-11-20 Thread Tony Morris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have installed mtl-1.1.1.0 so that xmonad-contrib-0.9.1 would compile with GHC 6.12.1. http://permalink.gmane.org/gmane.comp.lang.haskell.xmonad/10603 Then I tried to installed category-extras-0.53.5, which clashed with transformers-0.2.2.0 for the

Re: [Haskell-cafe] Musings on type systems

2010-11-20 Thread Stephen Tetley
On 20 November 2010 12:05, Tillmann Rendel wrote: > I would expect the "exponential type" to be (a -> b): > Terminologically, "Bananas in Space" (!) agrees with you. http://www.cs.nott.ac.uk/~gmh/bananas.pdf Regards Stephen ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Re: Codec.Crypto.RSA question

2010-11-20 Thread Charles-Pierre Astolfi
Here's a working example: import qualified Codec.Crypto.RSA as Crypto import System.Random (mkStdGen) import Data.Binary (encode) import Data.ByteString.Lazy.UTF8 (toString) n = 1024 (pubKey,privKey,_) = Crypto.generateKeyPair (mkStdGen n) n encrypt :: (Data.Binary.Binary a) => a -> Data.ByteStr

Re: [Haskell-cafe] Musings on type systems

2010-11-20 Thread Tillmann Rendel
Ketil Malde wrote: data Sum a b = A a | B b -- values = values in a + values in b data Prod a b = P a b-- values = values in a * values in b I guess this makes [X] an exponential type, although I don't remember seeing that term :-) I would expect the "exponential type" to be (a -> b):

[Haskell-cafe] Re: Codec.Crypto.RSA question

2010-11-20 Thread Dominic Steinitz
Charles-Pierre Astolfi crans.org> writes: > > Hi -cafe, > > I have a question about Codec.Crypto.RSA: how to enforce that > (informally) decrypt . encrypt = id > Consider this code: > That's certainly what I would expect and one of the unit tests that comes with http://hackage.haskell.org/pac

Re: [Haskell-cafe] Musings on type systems

2010-11-20 Thread Ketil Malde
Andrew Coppin writes: > Now here's an interesting thought. Haskell has "algebraic data > types". "Algebraic" because they are sum types of product types (or, > equivilently, product types of sum types). Now I don't actually know > what those terms mean, The quick rule to remember this that the s

Re: [Haskell-cafe] Musings on type systems

2010-11-20 Thread Tillmann Rendel
Hi Andrew, Andrew Coppin wrote: Now, what about type variables? What do they do? Well now, that seems to be slightly interesting, since a type variable holds an entire type (whereas normal program variables just hold a single value), and each occurrance of the same variable is statically guarant

Re: [Haskell-cafe] RegEx versus (Parsec, TagSoup, others...)

2010-11-20 Thread Stephen Tetley
On 19 November 2010 22:17, Brandon S Allbery KF8NH wrote: > If a Perl "expert" tells you that regexps are the way to parse HTML/XML, you > can safely conclude they've never actually tried to do it. For the original message it sounded like the Perl expert recommended regexps to scrape facts from

Re: [Haskell-cafe] Quasi quotation question

2010-11-20 Thread Oscar Finnsson
Sure. Just use http://hackage.haskell.org/package/haskell-src-meta-0.0.6. You are probably interested in parsePat or parseExp. I've used parseExp in a package. -- Oscar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailma