RE: [ghc5] (internal?) Bug in Socket.listen

2001-04-30 Thread Julian Seward (Intl Vendor)
Even better, there are patched binary builds for both x86-linux and sparc-solaris2, which fix this bug (+ a lot of others) at http://www.haskell.org/ghc/dist/5.00 /ghc-5.00-20010429-i386-unknown-linux.tar.gz and /ghc-5.00-20010429-sparc-sun-solaris2.tar.bz2 | > Does somebody have any t

RE: [ghc5] (internal?) Bug in Socket.listen

2001-04-30 Thread Simon Marlow
> Disclaimer: I noticed that Socket.lhs didn't change from 4.08.2. > > However, while Socket.listen works on 4.08.2, it *blocks* with ghc5. > The listening socket isn't even visible by netstat -an! > A Linux-strace looks like this: > > socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4 > fcntl(4, F_G

[ghc5] (internal?) Bug in Socket.listen

2001-04-30 Thread Volker Stolz
Disclaimer: I noticed that Socket.lhs didn't change from 4.08.2. However, while Socket.listen works on 4.08.2, it *blocks* with ghc5. The listening socket isn't even visible by netstat -an! A Linux-strace looks like this: socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4 fcntl(4, F_GETFL)

Re: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Marcin 'Qrczak' Kowalczyk
Mon, 30 Apr 2001 13:57:46 +0200, Michael Weber <[EMAIL PROTECTED]> pisze: > If user X writes/modifies ./.ghci, then it gets the ownership of X, > doesn't it? No. [qrczak ~]$ ls -l 1 -rw-rw-rw-1 martabin 3775 kwi 30 15:21 1 [qrczak ~]$ echo foo >1 [qrczak ~]$ ls -l 1 -rw-rw-rw-

ghc --make -O, ghci

2001-04-30 Thread S.D.Mechveliani
To my Me> For, with -O and much in-lining, the interfaces may be very large. Simon Marlow <[EMAIL PROTECTED]> replies Ma> You really don't want to use -O with GHCi (in fact, at the moment Ma> you can't). Me> This may be serious. For example, putStr $ show (sum1 [1..n]) Me> will need a cons

RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Simon Marlow
> On Mon, Apr 30, 2001 at 12:19:32 +0100, Simon Marlow wrote: > > > So, I think a safe solution is to ensure that the .ghci > file belongs > > > to the user. Checking for decent permissions would > increase security, > > > but well, IMO it's the users' fault, if he creates a 777 .ghci :-P > >

RE: ghc --make -O, ghci

2001-04-30 Thread Simon Marlow
> ?? > I do not understand. I meant -O only for ghc --make -O > (has -O sense in other situation?) Yes, I was talking about in interactive mode. It works fine with --make. > to compile _once_ the whole application library. > .o, .hi files are prepared once > (Why are you saying `to wait th

RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Simon Marlow
> In local.glasgow-haskell-bugs, you wrote: > >fstat() (this is one reason why using access() is generally > >discouraged). Using fstat() isn't particularly convenient > from Haskell > >- there's Posix.getFdStatus, but we'd have to use the Posix openFile > >interface and fdToHandle. Alternative

Re: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Volker Stolz
In local.glasgow-haskell-bugs, you wrote: >fstat() (this is one reason why using access() is generally >discouraged). Using fstat() isn't particularly convenient from Haskell >- there's Posix.getFdStatus, but we'd have to use the Posix openFile >interface and fdToHandle. Alternatively we also ca

Re: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Marcin 'Qrczak' Kowalczyk
Mon, 30 Apr 2001 12:49:23 +0100, Simon Marlow <[EMAIL PROTECTED]> pisze: > The problem is that both ~/.ghci and ./.ghci are useful: I use ~/.ghci > to do things like :set +s, and define some useful macros. Whereas > ./.ghci is great for doing things like: > >:set -iFoo:Bar >:set -fglasgow-exts

Re: Syntax for implicit parameters

2001-04-30 Thread Marcin 'Qrczak' Kowalczyk
Mon, 30 Apr 2001 05:22:13 -0700, Simon Peyton-Jones <[EMAIL PROTECTED]> pisze: > let dynamic > ?x = 3 > ?y = ?y+?x > in > ... > > * 'dynamic' is a special-id, only significant immediately following > a let. So 'dynamic' triggers the layout rule af

Patch for ghci/missing hCloses

2001-04-30 Thread Volker Stolz
The following patch contains two gratuitious hClose statements which are missing (indepentdant from the previous .ghci-patch). -- Abstrakte Syntaxträume. Volker Stolz * [EMAIL PROTECTED] * PGP + S/MIME --- InteractiveUI.orig Mon Apr 30 09:41:28 2001 +++ InteractiveUI.hsMon Apr 30 13:38:34

RE: Syntax for implicit parameters

2001-04-30 Thread Simon Peyton-Jones
Erik Meijer, John Launchbury and I discussed the syntax of implicit parameters at WG2.8 last week. We emerged with agreement on the following: instead of 'with' use let dynamic ?x = 3 ?y = ?y+?x in ... * 'dynamic' is a special-id, on

RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Julian Seward (Intl Vendor)
| On Mon, Apr 30, 2001 at 12:19:32 +0100, Simon Marlow wrote: | > > So, I think a safe solution is to ensure that the .ghci | file belongs | > > to the user. Checking for decent permissions would increase | > > security, but well, IMO it's the users' fault, if he | creates a 777 | > > .ghci

RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Simon Marlow
The problem is that both ~/.ghci and ./.ghci are useful: I use ~/.ghci to do things like :set +s, and define some useful macros. Whereas ./.ghci is great for doing things like: :set -iFoo:Bar :set -fglasgow-exts :load Main (the only drawback is that you can't add packag

Re: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Michael Weber
On Mon, Apr 30, 2001 at 12:19:32 +0100, Simon Marlow wrote: > > So, I think a safe solution is to ensure that the .ghci file belongs > > to the user. Checking for decent permissions would increase security, > > but well, IMO it's the users' fault, if he creates a 777 .ghci :-P > > I've thought a

RE: Wording of type error

2001-04-30 Thread Simon Marlow
> Good point. It would be better as > > In the definition of "glue" > > (i.e. leave out 'function') > > I also think you are probably right about replacing single-quotes with > double-quotes. It's easily done (one function, called > "quotes"). Does > anyone dissent? It'll cause loads

RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread BENNETT,ANDY (HP-Unitedkingdom,ex1)
Why not have an environment variable for its location. If it isn't set, just have it default to looking for .ghci in the user's home directory, if it is use that path instead. Regards, Andy. > -Original Message- > From: Simon Marlow [mailto:[EMAIL PROTECTED]] > Sent: 30 April 2001 12:20

RE: trouble with make install on darwin

2001-04-30 Thread Simon Marlow
> Thomas Hallock <[EMAIL PROTECTED]> gets the following error on > MacOS X when trying to build nhc98 with ghc. I think this must > either be a bug in ghc, or some incompatibility between ghc and zsh. > Bug report forwarded to the glasgow-haskell-bugs list for comments > from the ghc folks. > >

RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Simon Marlow
> So, I think a safe solution is to ensure that the .ghci file belongs > to the user. Checking for decent permissions would increase security, > but well, IMO it's the users' fault, if he creates a 777 .ghci :-P I've thought about this a bit more. It's not enough to just check the owner and per

RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-30 Thread Simon Marlow
> The problem is with directories like /tmp, or more generally > directories, which are not under the user's immediate control. > > $ echo ':! some-evil-script.sh' > /tmp/.ghci > > Then wait, until somebody steps into the boobie trap: if one cd's to > /tmp and executes ghci (to test stuff,

Patch [Re: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]]

2001-04-30 Thread Volker Stolz
I attached a fix which will NOT source a suspicious file and print out a warning. Could anyone with Wintendo please confirm that the Posix-stuff doesn't break anything for them? -- Abstrakte Syntaxträume. Volker Stolz * [EMAIL PROTECTED] * PGP + S/MIME --- ghci/InteractiveUI.orig Mon Apr 30

Re: Wording of type error

2001-04-30 Thread Marcin 'Qrczak' Kowalczyk
Sun, 29 Apr 2001 23:47:27 -0700, Simon Peyton-Jones <[EMAIL PROTECTED]> pisze: > I also think you are probably right about replacing single-quotes > with double-quotes. Maybe, but on haskelldoc@ it emerged that single 'quotes' might be good for distinguishing code snippets in comments (mostly si

Re: trouble with make install on darwin

2001-04-30 Thread Malcolm Wallace
Thomas Hallock <[EMAIL PROTECTED]> gets the following error on MacOS X when trying to build nhc98 with ghc. I think this must either be a bug in ghc, or some incompatibility between ghc and zsh. Bug report forwarded to the glasgow-haskell-bugs list for comments from the ghc folks. > I get this e