Namespace clashes
brk@jenkon.com
brk@jenkon.com
Thu, 16 Aug 2001 13:47:58 -0700
> -----Original Message-----
> From: Mark Carroll [SMTP:mark@chaos.x-philes.com]
> Sent: Wednesday, August 15, 2001 10:11 PM
> To: haskell-cafe@haskell.org
> Subject: Namespace clashes
>
> When I use Haskell, I'm still tripping over reserved words; lately I tried
> to use 'type' as a data field name, for example, and was somewhat
> irritated to note that I can't. (Can I?) What gives me the willies is that
>
[Bryn Keller]
Personally, I don't mind this sort of thing and I find the import
capabilities in Haskell sufficient for most purposes. However, I'm new
enough to Haskell that I sometimes have a hard time figuring out what I've
done wrong from the error messages. Here's one such:
func x =
do
data <- readFile x
return data
Where the problem is that I've mistakenly used the reserved word
'data' for a name binding. Here's the error message I get for that:
scratch.hs:3: Empty 'do' construct
But I'm learning. :-)