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
|
|
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
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
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
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
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,
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
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 = ...