[GHC] #907: Case sensitive ghci commands

2006-09-23 Thread GHC
#907: Case sensitive ghci commands +--- Reporter: [EMAIL PROTECTED] |Owner: Type: feature request | Status: new Priority: lowest |

Re: Year 2038 problem in GHC 6.4.2 runtime

2006-09-23 Thread Bulat Ziganshin
Hello Cyril, Friday, September 22, 2006, 6:16:44 PM, you wrote: As far as I can see, the current (6.4.2) GHC runtime suffers the year 2038 problem; that is, the System.Time module does not support dates from 2038 onwards (the code below reproduces the problem). there is new Time library,

bug in mallocForeignPtrBytes (both 6.4 and 6.6)

2006-09-23 Thread Bulat Ziganshin
Hello glasgow-haskell-users, the attached program show up the bug in mallocForeignPtrBytes (and newPinnedByteArray#) implementation - it allocates two times more memory as requested. The bug seen both on 6.6rc and june 6.4 windows builds, namely:

Re: bug in mallocForeignPtrBytes (both 6.4 and 6.6)

2006-09-23 Thread Duncan Coutts
On Sat, 2006-09-23 at 13:58 +0400, Bulat Ziganshin wrote: Hello glasgow-haskell-users, the attached program show up the bug in mallocForeignPtrBytes (and newPinnedByteArray#) implementation - it allocates two times more memory as requested. The bug seen both on 6.6rc and june 6.4 windows

Re: User preferences lost between Hugs upgrades on Windows

2006-09-23 Thread Claus Reinke
[some possibly shared hugs/ghci concerns] The settings on Windows are stored under a registry key for each specific release. This means that if you install WinHugs, carefully set up everything, then upgrade, you loose all your settings. part of the reason was also to enable multiple

Re: User preferences lost between Hugs upgrades on Windows

2006-09-23 Thread Neil Mitchell
Hi, a) shouldn't there be a way from within Hugs (or GHCi) to export/import settings? That can be added, but no one will use it - too much effort, not obvious thats what needs to be done. b) shouldn't there be an installation option checking for compatible old settings and offering

[Haskell] MR details (was: Implicit type of numeric constants)

2006-09-23 Thread Christian Sievers
Hello, I don't take my advice to go to haskell-cafe :-) The discussion continued outside the mailing list, and now I have two questions myself: 1. Why do the rules of the monomorphism restriction explicitly mention *simple* pattern bindings? Where is the difference, especially as there

[Haskell] Performance, Optimization and Code Generation

2006-09-23 Thread George Beshers
This starts out with my being interested in darcs - git related issues. Since git uses sha1 I wanted to have the ability to calculate sha1 in an application where I was intending to use darcs as a back-end. The performance gap is * 30 between Haskell and sha1sum. That seemed rather steep

Re: [Haskell] Performance, Optimization and Code Generation

2006-09-23 Thread roconnor
according to http://darcs.haskell.org/packages/base/GHC/Word.hs, GHC's rotate is implemented as (W32# x#) `rotate` (I# i#) | i'# ==# 0# = W32# x# | otherwise = W32# ((x# `shiftL32#` i'#) `or32#` (x# `shiftRL32#` (32# -# i'#))) where

[Haskell] ANNOUNCE: Dr Haskell 0.1

2006-09-23 Thread Neil Mitchell
Hi Haskell, This is the first release of Dr Haskell, a tool to help suggest improvements to your code. GETTING DR HASKELL See http://www-users.cs.york.ac.uk/~ndm/projects/drhaskell.php for details on how to download and install the program. There are prebuilt Windows binaries. This project

Re[2]: [Haskell] Performance, Optimization and Code Generation

2006-09-23 Thread Bulat Ziganshin
Hello roconnor, Saturday, September 23, 2006, 4:13:39 PM, you wrote: Also, shouldn't the calls to shiftL32# and shiftRL32# be calls to uncheckedShiftL32# and uncheckedShiftR32# since i'# and (32# -# i'#) are provably safe? yes. below is the code used in my lib: #ifdef __GLASGOW_HASKELL__

[Haskell] BitSyntax for Haskell

2006-09-23 Thread Adam Langley
Erlang's bit syntax[1] is a great for building and breaking up binary structures. I've knocked up something similar (although a little clumsy) for Haskell: http://www.imperialviolet.org/binary/bitsyntax/ http://www.imperialviolet.org/binary/bitsyntax/BitSyntax.hs I'm sure that this isn't the

Re: Here-docs in Haskell source

2006-09-23 Thread John Goerzen
On Fri, Sep 22, 2006 at 12:39:34PM -0400, Ian Zimmerman wrote: If you do this at all, reuse the regular quotes, don't invent yet another weird and wonderful lexical syntax. Haskell is already bad enough that way, with \ used for lambda and so on. @ would be okay I guess. Why not just go the

Re: Here-docs in Haskell source

2006-09-23 Thread John Meacham
I would also like to see these. I like the python syntax stuff... but really most anything will do. the triple quote doesn't eat any usable syntax though and won't require any special cases in the parser so I would much prefer something like that. John -- John Meacham -

Re: Here-docs in Haskell source

2006-09-23 Thread Ian Zimmerman
Ian If you do this at all, reuse the regular quotes, don't invent yet Ian another weird and wonderful lexical syntax. Haskell is already bad Ian enough that way, with \ used for lambda and so on. @ would be Ian okay I guess. John Why not just go the Python way and use ? That is, three John

Re: Here-docs in Haskell source

2006-09-23 Thread John Goerzen
On Fri, Sep 22, 2006 at 09:30:50PM -0400, Ian Zimmerman wrote: John Why not just go the Python way and use ? That is, three John literal quotes at the beginning and end. After all, Python has John lifted quite a few things from Haskell. Time to return the John favor. ;-) Because it

Re: Here-docs in Haskell source

2006-09-23 Thread Ian Zimmerman
John python-mode actually handles Python syntax a lot better than John haskell-mode handles Haskell syntax, particularly regarding John indentation. Automatic indentation is only one aspect of Emacs modes, and as far as I am concerned not nearly the most important one. Here's a quick test: put

Re: Here-docs in Haskell source

2006-09-23 Thread Alistair Bayley
On 22 Sep 2006 23:54:42 -0400, Ian Zimmerman [EMAIL PROTECTED] wrote: Here's a quick test: put the cursor in front of a triple-quoted string, then hit Control-Alt-F (forward-sexp). It should move just after the whole string. Does it? Any tool which assumes strings are delimited by a single

Re: Here-docs in Haskell source

2006-09-23 Thread Ian Zimmerman
Alistair In order to produce one double-quote inside a double-quote Alistair delimited string, many (most?) languages let you use two Alistair adjacent double quotes. So a string starting with triple Alistair double-quote would result in a string that has one double Alistair quote as its first

Re: Here-docs in Haskell source

2006-09-23 Thread John Goerzen
On Fri, Sep 22, 2006 at 11:54:42PM -0400, Ian Zimmerman wrote: John indentation. Automatic indentation is only one aspect of Emacs modes, and as far as I am concerned not nearly the most important one. Here's a quick test: put the cursor in front of a triple-quoted string, then hit

Re: Here-docs in Haskell source

2006-09-23 Thread Neil Mitchell
Hi Any tool which assumes strings are delimited by a single front delimiter and a single end delimiter, which they are in most reasonable languages, will have trouble. In current haskell any tool which assumes characters start and end with a ' are also wrong, because you can have name' as a

Re: [Haskell-cafe] Why am I not allowed to use CStringLen inforeignexport?

2006-09-23 Thread Brian Hulley
Andreas Marth wrote: low_l :: Word8 = fromIntegral (len .. 0x) low_h :: Word8 = fromIntegral (shiftR len 8 .. 0x) high_l :: Word8 = fromIntegral (shiftR len 16 .. 0x) high_h :: Word8 = fromIntegral (shiftR len 24 .. 0x) Hi - I just noticed the mask should be

Re: [Haskell-cafe] Trying to write a TCP proxy

2006-09-23 Thread Christian Sievers
John Ky wrote: I finally realised that hGetLine strips out the \n newline character so when I forward the line to the server, I need to append it again. Or use hPutStrLn instead of hPutStr ? (I may be missing something...) Bye Christian Sievers ___

[Haskell-cafe] Haskell Program

2006-09-23 Thread Tim Newsham
The company I work for was gracious enough to allow me to release a haskell program I wrote for them: http://www.isecpartners.com/file_fuzzers.html There's a python version and a rewrite in haskell. I used some looping constructs discussed earlier on this list to keep the haskell code

Re: [Haskell-cafe] Polymorphism/monomorphism (and the restriction)

2006-09-23 Thread Christian Sievers
Aaron McDaid wrote: This code experiments with Int, Float and (Num a) = a, and I tried to print x*2 and x/2 for each. (4::Int)/2 isn't allowed because / isn't defined for Ints. More exactly: (/) is a member function of the Fractional class, and Int is not an instance of this class. You

[Haskell-cafe] Re: [newbie] How to test this function?

2006-09-23 Thread Benjamin Franksen
Bruno Martínez [EMAIL PROTECTED] writes: On Thu, 21 Sep 2006 15:12:07 -0300, Benjamin Franksen [EMAIL PROTECTED] wrote: OK. Thanks. I didn't find that one because it's not offered as an identation option in emacs haskell mode. Emacs is evil! David House wrote: I'll ignore the

[Haskell-cafe] Haskell.org down

2006-09-23 Thread Donald Bruce Stewart
Just in case it has gone unnoticed, haskell.org seems to have been down for a few hours now. Do we have an admin looking into this? -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re[2]: [Haskell-cafe] Why am I not allowed to use CStringLen inforeignexport?

2006-09-23 Thread Bulat Ziganshin
Hello Brian, Friday, September 22, 2006, 9:03:01 PM, you wrote: withBSTR8 :: [Char] - (BSTR8 - IO a) - IO a withBSTR8 s f = bracket (createBSTR8 s) (\bstr - free (bstr `plusPtr` (-4))) (\bstr - f bstr) this may be shortened to

[Haskell-cafe] Re: [Haskell] MR details (was: Implicit type of numeric constants)

2006-09-23 Thread Bernie Pope
On 23/09/2006, at 4:33 AM, Christian Sievers wrote: Hello, I don't take my advice to go to haskell-cafe :-) I will take your advice :) The discussion continued outside the mailing list, and now I have two questions myself: 1. Why do the rules of the monomorphism restriction explicitly

Re: [Haskell-cafe] Haskell.org down

2006-09-23 Thread Paul Hudak
Thanks Don. I alerted our IT staff this morning, and they seem to have things working again, although here is their final response: The web server had over 150 client connections which exceeded its limit. I restarted the web server and all is well. I'll keep and eye on it and see if

Re: [Haskell-cafe] Haskell Program

2006-09-23 Thread Neil Mitchell
Cool! Were you going to tell us what the program does, or are we supposed to read the source and figure it out? From the web page: File Fuzzers These tools are useful for testing any program which processes binary file inputs such as archivers and image file viewers. FileP is a

[Haskell-cafe] Re: [newbie] How to test this function?

2006-09-23 Thread Stefan Monnier
First, how do I fix the identation of the if then else? getList = find 5 where find 0 = return [] find n = do ch - getChar if ch `elem` ['a'..'e'] then do tl - find (n-1) return (ch : tl) else find n OK. Thanks. I didn't find that one because it's not offered as an identation option

Re: [Haskell-cafe] Re: [Haskell] MR details (was: Implicit type of numeric constants)

2006-09-23 Thread Michael Shulman
On 9/23/06, Bernie Pope [EMAIL PROTECTED] wrote: If a pattern binding is not simple, it must have a data constructor on the lhs, therefore it cannot be overloaded. So the (dreaded) MR only applies to simple pattern bindings. I thought it was simple pattern bindings that could be *exempted*

[Haskell-cafe] Re: [newbie] How to test this function?

2006-09-23 Thread Stefan Monnier
For that one, if it doesn't get mended for long enough, Haskell' might accept the present layout. http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse Hmm... the bug in haskell-mode has been known for almost a year now. So you're saying that I should just wait even more and it'll

Re: [Haskell-cafe] Re: [Haskell] MR details (was: Implicit type of numeric constants)

2006-09-23 Thread Bernie Pope
On 24/09/2006, at 1:46 AM, Michael Shulman wrote: On 9/23/06, Bernie Pope [EMAIL PROTECTED] wrote: If a pattern binding is not simple, it must have a data constructor on the lhs, therefore it cannot be overloaded. So the (dreaded) MR only applies to simple pattern bindings. I thought it

[Haskell-cafe] variadic functions and typeCast

2006-09-23 Thread Michael Shulman
Hi all, I am writing, for my own amusement, a more general version of the trick to implement variadic functions in Haskell outlined at http://okmij.org/ftp/Haskell/vararg-fn.lhs. (If someone else has done this already, please point me to it!) Code is attached at the end of the message. My

[Haskell-cafe] Unable to profile program using Data.ByteString.Lazy

2006-09-23 Thread Lyle Kopnicky
Hi folks, I wrote a program that uses some of the Data.ByteString libraries. I'm using GHC 6.4.1 and FPS 0.7. The program compiles and works just fine. But when I try to profile it, by compiling with -prof, I get: Failed to load interface for `Data.ByteString.Lazy': Could not

Re: [Haskell-cafe] Unable to profile program using Data.ByteString.Lazy

2006-09-23 Thread Donald Bruce Stewart
lists: Hi folks, I wrote a program that uses some of the Data.ByteString libraries. I'm using GHC 6.4.1 and FPS 0.7. The program compiles and works just fine. But when I try to profile it, by compiling with -prof, I get: Failed to load interface for `Data.ByteString.Lazy':

[Haskell-cafe] FFI and LD_PRELOAD - segfault

2006-09-23 Thread Stephan Walter
Hi, I'm trying to use a shared lib written in Haskell to overload C functions via LD_PRELOAD. You might think this is a bit silly, but hey, why not? I want to overload connect() from sys/socket.h. I'll document what I've written so far; unfortunately there doesn't seem to be a lot of

Re: [Haskell-cafe] Haskell.org down

2006-09-23 Thread Duncan Coutts
On Sat, 2006-09-23 at 09:58 -0400, Paul Hudak wrote: Thanks Don. I alerted our IT staff this morning, and they seem to have things working again, although here is their final response: The web server had over 150 client connections which exceeded its limit. I restarted the web

Re: [Haskell-cafe] Haskell.org down

2006-09-23 Thread Tony Morris
I have been linked before on slashdot to my humble web server (all 333MHz of awesome CPU power). I can attest to the effect that you are describing. Tony Morris http://tmorris.net/ Tomasz Zielonka wrote: On Sat, Sep 23, 2006 at 06:03:41PM +0200, Tomasz Zielonka wrote: Yesterday there was a

Re[2]: [Haskell-cafe] Haskell.org down

2006-09-23 Thread Bulat Ziganshin
Hello Paul, Saturday, September 23, 2006, 5:58:02 PM, you wrote: So either Haskell is getting really popular (on a Friday night?) or there's something fishy going on. are you sure that all haskellers live in England? ;) -- Best regards, Bulatmailto:[EMAIL

Re: [Haskell-cafe] Haskell.org down

2006-09-23 Thread Donald Bruce Stewart
paul.hudak: Thanks Don. I alerted our IT staff this morning, and they seem to have things working again, although here is their final response: The web server had over 150 client connections which exceeded its limit. I restarted the web server and all is well. I'll keep and eye