RE: Show Bug (I think)

2006-05-03 Thread Simon Peyton-Jones
True, thank you. I'm fixing it as we speak. drvrun020 is the test. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-bugs- | [EMAIL PROTECTED] On Behalf Of Neil Mitchell | Sent: 30 April 2006 19:10 | To: glasgow-haskell-bugs@haskell.org | Subject: Show Bug (I

Re: [GHC] #738: ghc can't load files with selinux Enforcing

2006-05-03 Thread GHC
#738: ghc can't load files with selinux Enforcing -+-- Reporter: [EMAIL PROTECTED] | Owner: Type: bug | Status: new Priority: normal

File remains locked after crash

2006-05-03 Thread Neil Mitchell
Hi, On Windows, using GHCi 6.4.2, its possible to lock files open: Change to a directory and run, at the prompt, with a file called test2.txt already created: writeFile test1.txt (error fail) or readFile test2.txt putStrLn (error fail) The file test.txt is created, for the first. In both

[GHC] #762: Unregistered build fails because libghccompat is not built

2006-05-03 Thread GHC
#762: Unregistered build fails because libghccompat is not built +--- Reporter: jeremy at n-heptane.com |Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #762: Unregistered build fails because libghccompat is not built

2006-05-03 Thread GHC
#762: Unregistered build fails because libghccompat is not built --+- Reporter: jeremy at n-heptane.com | Owner: Type: bug | Status: new Priority: normal

RE: [Haskell] (GHC) Boot files and instance declarations

2006-05-03 Thread Simon Peyton-Jones
At the moment GHC just doesn't support this, I'm afraid. It's a shortcoming, and one that could be fixed, but not in a minute or two. You'll have to find some other way to reorganise your code, I think. Incidentally questions specific to GHC belong on ghc-users, to which I have redirected this

Re: Building ghc-6.4 on Solaris x86

2006-05-03 Thread Simon Marlow
Georg Sauthoff wrote: Ok, I tried[1] that and like I guessed, now I get again the infamous 'Prologue junk?' error' again: ../../ghc/compiler/ghc-inplace -H16m -O -O2 -static -I. -#include Prelude.h -#include Rts.h -#include RtsFlags.h -#include RtsUtils.h -#include StgRun.h -#include

Re: import prefers module in package over local module

2006-05-03 Thread Simon Marlow
I'm afraid I don't understand: there's no Pretty module in the standard libraries, only Text.PrettyPrint. Could you describe in more detail what's going wrong? (provide example code and exact command lines, cut paste error messages). Cheers, Simon Michael Marte wrote: Simon, I

Re: On GHC HEAD, Fefora Cote 5 and SELinux

2006-05-03 Thread Simon Marlow
wld wrote: As described in trac ticket 738, GHC HEAD does not work on Fedora Core 5 with selinux in enforcing mode. Selinux is the additional level of protection in Linux kernel that works above usual Unix permissions. Turning selinux to permissive mode (as suggested in the workaround to make

Re: import prefers module in package over local module

2006-05-03 Thread Tomasz Zielonka
On Wed, May 03, 2006 at 11:53:19AM +0100, Simon Marlow wrote: I'm afraid I don't understand: there's no Pretty module in the standard libraries, only Text.PrettyPrint. There is a Pretty module in the text package. It seems that Michael uses ghc -package text. Best regards Tomasz

Re: import prefers module in package over local module

2006-05-03 Thread Simon Marlow
Tomasz Zielonka wrote: On Wed, May 03, 2006 at 11:53:19AM +0100, Simon Marlow wrote: I'm afraid I don't understand: there's no Pretty module in the standard libraries, only Text.PrettyPrint. There is a Pretty module in the text package. It seems that Michael uses ghc -package text. Ok

Re: import prefers module in package over local module

2006-05-03 Thread Michael Marte
Simon Marlow wrote: Tomasz Zielonka wrote: On Wed, May 03, 2006 at 11:53:19AM +0100, Simon Marlow wrote: I'm afraid I don't understand: there's no Pretty module in the standard libraries, only Text.PrettyPrint. There is a Pretty module in the text package. It seems that Michael uses ghc

Re: Building ghc-6.4 on Solaris x86

2006-05-03 Thread Georg Sauthoff
On Wed, May 03, 2006 at 11:50:46AM +0100, Simon Marlow wrote: Hi, You shouldn't see the %ebp instructions, because gcc should be invoked with -fomit-frame-pointer. Is it possible that somehow part of your build thinks it is unregisterised? I hope not. Started with a fresh tree and

Re: Building ghc-6.4 on Solaris x86

2006-05-03 Thread Georg Sauthoff
On Wed, May 03, 2006 at 05:56:18PM +0200, Georg Sauthoff wrote: On Wed, May 03, 2006 at 11:50:46AM +0100, Simon Marlow wrote: Hi, [..] Try running GHC with -v, see whether the -fomit-frame-pointer flag is being passed to gcc. If not, try to find out why - it should be added by code in

eval in ghc(i)?

2006-05-03 Thread Geoffrey Alan Washburn
I have an application written in OCaml that I'm interested in porting over to Haskell, and I was wondering what the best way to replace the following OCaml function would be: Toploop.initialize_toplevel_env();; let eval txt = let lb = (Lexing.from_string txt) in let phr =

Re: eval in ghc(i)?

2006-05-03 Thread Donald Bruce Stewart
geoffw: I have an application written in OCaml that I'm interested in porting over to Haskell, and I was wondering what the best way to replace the following OCaml function would be: Toploop.initialize_toplevel_env();; let eval txt = let lb = (Lexing.from_string txt) in

Re: WordPtr,IntPtr,IntMax,WordMax

2006-05-03 Thread John Meacham
On Tue, May 02, 2006 at 03:29:16AM +, Aaron Denney wrote: On 2006-04-29, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Am Donnerstag, den 06.04.2006, 16:37 -0700 schrieb John Meacham: On Thu, Apr 06, 2006 at 04:28:01PM -0700, John Meacham wrote: I was curious if ghc could support the

Re: eval in ghc(i)?

2006-05-03 Thread Lemmih
On 5/4/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: geoffw: I have an application written in OCaml that I'm interested in porting over to Haskell, and I was wondering what the best way to replace the following OCaml function would be: Toploop.initialize_toplevel_env();;

Re: eval in ghc(i)?

2006-05-03 Thread wld
Hi, On 5/4/06, Lemmih [EMAIL PROTECTED] wrote: You can also use the GHC library: Prelude :m GHC Prelude GHC GHC.init (Just /home/david/coding/haskell/ghc/usr/lib/ghc-6.5) Prelude GHC session - newSession Interactive Prelude GHC setSessionDynFlags session = initPackages = getSessionDynFlags

Re: eval in ghc(i)?

2006-05-03 Thread Lemmih
On 5/4/06, wld [EMAIL PROTECTED] wrote: Hi, On 5/4/06, Lemmih [EMAIL PROTECTED] wrote: You can also use the GHC library: Prelude :m GHC Prelude GHC GHC.init (Just /home/david/coding/haskell/ghc/usr/lib/ghc-6.5) Prelude GHC session - newSession Interactive Prelude GHC setSessionDynFlags

Unregisterised GHC 6.4.2 on the ARM success -- now what?

2006-05-03 Thread Jeremy Shaw
Hello, I believe I have successfully got an unregisterised version of ghc 6.4.2 compiled for arm/linux. Details: --- I only had to do a minor bit of hacking -- this bug contains the details of what went wrong: http://hackage.haskell.org/trac/ghc/ticket/762 My target platform is the nokia

Re[2]: eval in ghc(i)?

2006-05-03 Thread Bulat Ziganshin
Hello Lemmih, Thursday, May 4, 2006, 6:32:17 AM, you wrote: Nothing, my patches for loading 'ghc' in ghci have resided in the main repository for a couple of months. afaik, Lemmih just uses HEAD (6.5), i.e. beta version of ghc, which is only version that includes this lib -- Best regards,

Re[2]: [Haskell] Optimizing locking with MVars

2006-05-03 Thread Bulat Ziganshin
Hello John, Wednesday, May 3, 2006, 2:37:03 AM, you wrote: This reminds me, I wonder if we should have an MVar varient that is _just_ for locking, it would have no separate take and put primitives, just a withLock, enforcing the restriction that the thread that took the lock is the same one

[Haskell] ANNOUNCE: hmake-3.11

2006-05-03 Thread Malcolm Wallace
hmake - 3.11 This announcement is for a bug-fix release of 'hmake', the compiler-independent project-building tool for Haskell programs. It automates recompilation analysis, based on import declarations in your files, to rebuild only

Re: termination for FDs and ATs

2006-05-03 Thread Stefan Wehr
Manuel M T Chakravarty [EMAIL PROTECTED] wrote:: Martin Sulzmann: Manuel M T Chakravarty writes: Martin Sulzmann: A problem with ATs at the moment is that some terminating FD programs result into non-terminating AT programs. Somebody asked how to write the MonadReader class

Re: termination for FDs and ATs

2006-05-03 Thread Iavor Diatchki
Hello, On 5/3/06, Stefan Wehr [EMAIL PROTECTED] wrote: class C a class F a where type T a instance F [a] where type T [a] = a class (C (T a), F a) = D a where m :: a - Int instance C a = D [a] where m _ = 42 If you now try to derive D [Int], you get ||- D

Re: [Haskell-cafe] Code review: efficiency question

2006-05-03 Thread Brian Hulley
Bulat Ziganshin wrote: [ideas including reverseMapM_] you will laugh, but speed of your two solutions depends on so many factors (including size of CPU cache) that noone can say that is better in general. although for small lists reverseMapM_ should be faster than reverse+mapM. what will be

Re: [Haskell-cafe] Code review: efficiency question

2006-05-03 Thread Josef Svenningsson
Brian, You might also want to take a look at the list fusion functionality in GHC which often can help optimize your programs when programming with lists. http://www.haskell.org/ghc/docs/latest/html/users_guide/rewrite-rules.html#id3153234 It doesn't help in your particular program but it might

[Haskell-cafe] Re: Optimizing locking with MVars

2006-05-03 Thread Simon Marlow
This is interesting, thanks. I propose to add INLINE pragmas to withMVar and friends. Having an interface for simple locks sounds like a good idea to me. Would you like to send a patch? This won't affect Handle I/O unfortunately, because we need block to protect against asynchronous

RE: [Haskell-cafe] Is it possible to export module aliases?

2006-05-03 Thread Simon Peyton-Jones
Are you asking for the same thing as described under Permit qualified exports on this Haskell Prime page? http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/ModuleSyst em Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of |

[Haskell-cafe] Re: Am I lazy enough?

2006-05-03 Thread Spencer Janssen
ByteString's are strict in their contents, so when you do an hGetContents you'll read the entire file into memory! This negates any laziness benefits right off the bat. The trickiest part is the lazy IO, you have to use unsafeInterleaveIO or something similar. Below is a program that does

[Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-03 Thread Marc Weber
I'm trying to write some true type library (implementing only the tables I need at the moment). When loading a font file it doesn't make sense to parse every table which isn't needed. So lazyness of haskell would perfectly meet requirements here. My problem: NewBinary supports memory buffers.

Re: [Haskell-cafe] Re: Optimizing locking with MVars

2006-05-03 Thread John Meacham
On Wed, May 03, 2006 at 12:07:19PM +0100, Simon Marlow wrote: This won't affect Handle I/O unfortunately, because we need block to protect against asynchronous exceptions. I'm still not certain you won't need that in the stream library, too: check any stateful code (eg. buffering) and

Re: [Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-03 Thread Bulat Ziganshin
Hello Marc, Thursday, May 4, 2006, 2:21:58 AM, you wrote: getTable1 bh = do bh = seek bh offset -- seek to the beginning of the table get binary data and build internal representation return list of glyph and outlines and ... just add unsafePerformIO: getTable1 bh = unsafePerformIO $

Re[2]: [Haskell-cafe] Re: Optimizing locking with MVars

2006-05-03 Thread Bulat Ziganshin
Hello John, Thursday, May 4, 2006, 12:33:54 AM, you wrote: This won't affect Handle I/O unfortunately, because we need block to protect against asynchronous exceptions. I'm still not certain you won't need that in the stream library, too: check any stateful code (eg. buffering) and