Re: [GHC] #2209: MagicHash extraction is wrong on x86_64 with -fasm -O2

2008-05-27 Thread GHC
#2209: MagicHash extraction is wrong on x86_64 with -fasm -O2 --+- Reporter: quark | Owner: simonmar Type: bug | Status: new Priority: normal| Milestone: 6.8.3

GHC rewrite rules pragma

2008-05-27 Thread Jan Jakubuv
Hi, I'm trying to find out how the GHC rewrite rules pragma work, but I'm not able to make it working. I have this simple example, where I would like to specialize the function gen to spec on strings: {-# OPTIONS -O2 -fglasgow-exts #-} gen :: [a] - a gen = head {-# RULES gen/Char gen=spec #-}

Re: GHC rewrite rules pragma

2008-05-27 Thread Don Stewart
jakubuv: Hi, I'm trying to find out how the GHC rewrite rules pragma work, but I'm not able to make it working. I have this simple example, where I would like to specialize the function gen to spec on strings: {-# OPTIONS -O2 -fglasgow-exts #-} gen :: [a] - a gen = head {-# RULES

Re: GHC rewrite rules pragma

2008-05-27 Thread Jan Jakubuv
Thanks lot, it works now. Now, I have just a simple question: Is there any chance to make rewriting working in ghci ? jan. 2008/5/27 Don Stewart [EMAIL PROTECTED]: jakubuv: Hi, I'm trying to find out how the GHC rewrite rules pragma work, but I'm not able to make it working. I have this

Re: GHC rewrite rules pragma

2008-05-27 Thread Don Stewart
jakubuv: Thanks lot, it works now. Now, I have just a simple question: Is there any chance to make rewriting working in ghci ? I think you can actually enable them by putting: {-# OPTIONS -frewrite-rules #-} at the top of the file to be interpreted. Works for me, anyway. -- Don

Re: GHC rewrite rules pragma

2008-05-27 Thread Jan Jakubuv
thanks, it works fine now. 2008/5/27 Don Stewart [EMAIL PROTECTED]: jakubuv: Thanks lot, it works now. Now, I have just a simple question: Is there any chance to make rewriting working in ghci ? I think you can actually enable them by putting: {-# OPTIONS -frewrite-rules #-} at the top

[Haskell] ANN: SmallCheck 0.4

2008-05-27 Thread Colin Runciman
SmallCheck 0.4: another lightweight testing library in Haskell -- A new version of SmallCheck can be obtained from: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/smallcheck or alternatively from

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Don Stewart
andrewcoppin: Gleb Alexeyev wrote: foo :: (forall a . a - a) - (Bool, String) foo g = (g True, g bzzt) So, after an entire day of boggling my mind over this, I have brought it down to one simple example: (id 'J', id True) -- Works perfectly. \f - (f 'J', f True) -- Fails

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Chaddaï Fouché
2008/5/27 Andrew Coppin [EMAIL PROTECTED]: Gleb Alexeyev wrote: foo :: (forall a . a - a) - (Bool, String) foo g = (g True, g bzzt) So, after an entire day of boggling my mind over this, I have brought it down to one simple example: (id 'J', id True) -- Works perfectly. \f - (f 'J',

Re: Re: [Haskell-cafe] Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Kim-Ee Yeoh
Andrew Coppin wrote: So, after an entire day of boggling my mind over this, I have brought it down to one simple example: (id 'J', id True) -- Works perfectly. \f - (f 'J', f True) -- Fails miserably. Both expressions are obviously perfectly type-safe, and yet the type

Re: Re: [Haskell-cafe] Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Darrin Thompson
On Tue, May 27, 2008 at 3:40 PM, Kim-Ee Yeoh [EMAIL PROTECTED] wrote: Let's fill in the type variable: (x - x) - (Char, Bool) == forall x. (x - x) - (Char, Bool) == x_t - (x - x) - (Char, Bool), where x_t is the hidden type-variable, not unlike the reader monad. As you've pointed out, callER

[Haskell-cafe] Re: HDBC with SQL Server / OBDC

2008-05-27 Thread Morten Holm Pedersen
John Goerzen wrote: On Sunday 25 May 2008 11:24:20 am Morten Holm Pedersen wrote: am trying to do a simple DB connection from Haskell to a SQL Server 2005 (on Windows obviously). The DSN name (Nylon) works from C++ but when running the below example (or any other I can think of) ghci crashes.

Re: [Haskell-cafe] Examples of using Haskell for mathematics

2008-05-27 Thread Conal Elliott
Along these lines, check out (and maybe quote) the July 2007 note from Doug McIlroy to the Haskell list: http://www.haskell.org/pipermail/haskell/2007-July/019632.html I've particularly been enjoying Doug's paper The Music of Streams, mentioned in that note. - Conal On Mon, May 26, 2008 at

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Thomas Hartman
maybe try runghc Setup.hs clean or fresh darcs checkout and try build again from scratch. it's helped me in the past. thomas. Am 26. Mai 2008 21:32 schrieb Galchin, Vasili [EMAIL PROTECTED]: Hello, One of my test cases will not build. I am running: [EMAIL PROTECTED]:~$ ghc -v

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Isaac Dupree
Chaddaï Fouché wrote: - Why are top-level variables and function arguments treated differently by the type system? They aren't In a sense, they are. id :: (forall a. a - a) useId :: (forall a. a - a) - (Int,Bool) brokenUseId :: (forall a. (a - a) - (Int,Bool)) brokenUseId :: (a - a) -

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Galchin, Vasili
when I do a clean followed by configure then dist is empty vasili On Tue, May 27, 2008 at 4:37 PM, Thomas Hartman [EMAIL PROTECTED] wrote: maybe try runghc Setup.hs clean or fresh darcs checkout and try build again from scratch. it's helped me in the past. thomas. Am 26. Mai 2008

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Galchin, Vasili
actually I also got a core file. ... when I am running runghc Setup.lhs . and get a core file when I run gdb on the core file in this situation what Linux executable should I specify with the core file? ghc? Also when building ghc how to do I specify to keep symbol table for debugging? Is it

[Haskell-cafe] ANN: HSmugMug 0.1 - a haskell wrapper to the photo site smugmug's api

2008-05-27 Thread Daniel Patterson
Released May 27th, 2008. I've been working for a little while on a haskell wrapper to the photo hosting site Smugmug's api. As of now, the library is pretty simple - it is 'read-only' - ie, you can't use it to upload to or create galleries, but I still think it is potentially useful to

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Tillmann Rendel
Andrew Coppin wrote: So, after an entire day of boggling my mind over this, I have brought it down to one simple example: (id 'J', id True) -- Works perfectly. \f - (f 'J', f True) -- Fails miserably. Both expressions are obviously perfectly type-safe, and yet the type checker

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Thomas Hartman
I think dist gets populated when you do build. 2008/5/27 Galchin, Vasili [EMAIL PROTECTED]: when I do a clean followed by configure then dist is empty vasili On Tue, May 27, 2008 at 4:37 PM, Thomas Hartman [EMAIL PROTECTED] wrote: maybe try runghc Setup.hs clean or fresh darcs

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Philippa Cowderoy
Warning for Andrew: this post explains a new-to-you typed lambda calculus and a significant part of the innards of Hindley-Milner typing in order to answer your questions. Expect to bang your head a little! On Tue, 27 May 2008, Andrew Coppin wrote: - A function starts out with a polymorphic

Re: Re: [Haskell-cafe] Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Ryan Ingram
On 5/27/08, Darrin Thompson [EMAIL PROTECTED] wrote: On Tue, May 27, 2008 at 3:40 PM, Kim-Ee Yeoh [EMAIL PROTECTED] wrote: What we want is the callEE to choose x_t since callEE needs to instantiate x_t to Char and Bool. What we want is (x_t - x - x) - (Char, Bool). But that's just

Re: [Haskell-cafe] Aren't type system extensions fun?

2008-05-27 Thread Ryan Ingram
On 5/26/08, Andrew Coppin [EMAIL PROTECTED] wrote: This is probably the first real use I've ever seen of so-called rank-2 types, and I'm curios to know why people think they need to exist. [Obviously when somebody vastly more intelligent than me says something is necessary, they probably know

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Duncan Coutts
On Tue, 2008-05-27 at 15:33 -0700, Thomas Hartman wrote: I think dist gets populated when you do build. Actually we also stash the configuration in ./dist/setup-config so that gets created at configure time. Galchin's problem is that something goes wrong during the configure and so nothing

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Luke Palmer
On Tue, May 27, 2008 at 5:55 PM, Andrew Coppin [EMAIL PROTECTED] wrote: Gleb Alexeyev wrote: foo :: (forall a . a - a) - (Bool, String) foo g = (g True, g bzzt) So, after an entire day of boggling my mind over this, I have brought it down to one simple example: (id 'J', id True) --

[Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Dan Piponi
In particular, which syllable gets the stress, and what are the lengths of the two vowels? Couldn't find anything in the FAQ (http://www.haskell.org/haskellwiki/Cabal/FAQ). -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Clifford Beshers
As in the dictionary (http://www.merriam-webster.com/dictionary/cabal), accent on the second syllable, which is pronounced like none of ball, balance, boll and bale. Roughly the same rhythm as kaboom. On Tue, May 27, 2008 at 6:04 PM, Dan Piponi [EMAIL PROTECTED] wrote: In particular, which

[Haskell-cafe] Re: the Network.URI parser

2008-05-27 Thread Peter Gammie
On 27/05/2008, at 6:08 PM, Neil Mitchell wrote: It most certainly is a security flaw. In the src of an img, yes, probably. In the href of a link, its a completely valid thing to do - and one that I've done loads of times. The URI is fine, its just the particular location that is dodgy.

Re: [Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Benjamin L. Russell
Actually, according to the definition that you used (http://www.merriam-webster.com/dictionary/cabal), there are the following two pronunciations of cabal: 1) \kə-ˈbäl\ 2) \kə-ˈbal\ The a phoneme of the ˈbal syllable of pronunciation 2 is actually defined to be identical to the first syllable

Re: [Haskell-cafe] Re: the Network.URI parser

2008-05-27 Thread Miguel Mitrofanov
I am taking comments on a web forum from arbitrary people. The interpretation of the HTML occurs at the user's browser. A lot of people will be using outdated browsers (IE 5.5 / 6), ergo security (at the source) becomes my problem. I cannot force them to upgrade their browsers. I think

Re: [Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Clifford Beshers
On Tue, May 27, 2008 at 10:27 PM, Benjamin L. Russell [EMAIL PROTECTED] wrote: Actually, according to the definition that you used ( http://www.merriam-webster.com/dictionary/cabal), there are the following two pronunciations of cabal: 1) \kə-ˈbäl\ 2) \kə-ˈbal\ The a phoneme of the ˈbal

[Haskell-cafe] Lazy lists simulated by unboxed mutable arrays

2008-05-27 Thread Henning Thielemann
I wonder whether the following idea has been investigated or implemented somewhere: We could simulate a list with strict elements, i.e. data StrictList a = Elem !a (StrictList a) | End by an unboxed array with a cursor to the next element to be evaluated and a function that generates