RE: [Haskell-cafe] Hiding functions

2004-08-16 Thread Simon Peyton-Jones
Yes that's true. See http://haskell.org/onlinereport/modules.html Section 5.5 S | -Original Message- | From: Lyle Kopnicky [mailto:[EMAIL PROTECTED] | Sent: 13 August 2004 23:37 | To: Simon Peyton-Jones | Cc: Haskell Cafe | Subject: Re: [Haskell-cafe] Hiding functions | |

Re: [Haskell-cafe] Hiding functions

2004-08-14 Thread Martin Sjögren
On Fri, 13 Aug 2004 15:32:51 -0700, Lyle Kopnicky <[EMAIL PROTECTED]> wrote: > Simon, > > That makes good sense, as it's hard to read code that contains standard > terms used in a nonstandard way. I was just concerned that the function > name I wanted to use was already in the Prelude! Perhaps t

Re: [Haskell-cafe] Hiding functions

2004-08-13 Thread Lyle Kopnicky
Simon, It also appears that if I don't call 'catch' from my module, I can import both and not have a conflict. - Lyle Simon Peyton-Jones wrote: It's an explicit Haskell 98 design choice http://haskell.org/onlinereport/modules.html "5.6.2 Shadowing Prelude Names The rules about the Prelud

Re: [Haskell-cafe] Hiding functions

2004-08-13 Thread Lyle Kopnicky
Alistair, I'm throwing my own exceptions in my own monad, not the IO one. But thanks for pointing me to the stuff about dynamic types. I'm going to be creative and pick some new names. - Lyle Bayley, Alistair wrote: What is wrong with creating your own catch and throw with different names? e.g

Re: [Haskell-cafe] Hiding functions

2004-08-13 Thread Lyle Kopnicky
t declaration that makes this nonstandard usage explicit." It's a decision one could debate, but it was an explicit choice. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lyle | Kopnicky | Sent: 12 August 2004 20:23 | To: Haskell Cafe | Su

RE: [Haskell-cafe] Hiding functions

2004-08-13 Thread Simon Peyton-Jones
skell Cafe | Subject: [Haskell-cafe] Hiding functions | | Hi all, | | I'm working on a program that uses my own brand of exceptions, and I | created two functions called 'throw' and 'catch'. In order for this to | work, I hide the Prelude 'catch' in my module,

RE: [Haskell-cafe] Hiding functions

2004-08-13 Thread Bayley, Alistair
hrowDyn/catchDyn, so you have to use something other than catch/throw anyway. Alistair. > -Original Message- > From: Lyle Kopnicky [mailto:[EMAIL PROTECTED] > Sent: 12 August 2004 20:23 > To: Haskell Cafe > Subject: [Haskell-cafe] Hiding functions > > Hi all, > > I

[Haskell-cafe] Hiding functions

2004-08-12 Thread Lyle Kopnicky
Hi all, I'm working on a program that uses my own brand of exceptions, and I created two functions called 'throw' and 'catch'. In order for this to work, I hide the Prelude 'catch' in my module, called 'Cont.hs'. Thus: module Cont where import Prelude hiding (catch) ... throw = ... catch = ...