[ ghc-Bugs-756454 ] Class op should mention class tyvar

2003-06-18 Thread SourceForge.net
Bugs item #756454, was opened at 2003-06-18 08:20
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=756454group_id=8032

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Simon Peyton Jones (simonpj)
Assigned to: Nobody/Anonymous (nobody)
Summary: Class op should mention class tyvar

Initial Comment:
   class Foo a where
  op :: Int

is accepted, but it should be rejected.  Any use of op 
give ambiguity errors, of course, but it should be 
rejected up front.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=756454group_id=8032
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[ ghc-Bugs-751175 ] ghc --make deletes source file in Windows

2003-06-18 Thread SourceForge.net
Bugs item #751175, was opened at 2003-06-09 04:42
Message generated for change (Comment added) made by simonpj
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=751175group_id=8032

Category: Compiler
Group: 6.0
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: ghc --make deletes source file in Windows

Initial Comment:
I’ve a very strange problem that may be related to my 
computer. 

If I compile a file with ghc -–make from outside the 
directory where the source file is, using \ as the path 
separator, the file gets deleted. (Using Windows 2000 
and GHC 6.0)

For example:

F:\cat  project\test.hs
module Main where
main = putStrLn Hello

F:\ghc --make project/test.hs
Chasing modules from: project/test.hs
Compiling Main ( project/test.hs, 
project/test.o )
Linking ...

F:\ghc --make project\test.hs
Chasing modules from: project\test.hs
Skipping  Main ( project/test.hs, project/test.o )
Linking ...

F:\ghc --make project\test.hs
Chasing modules from: project\test.hs
ghc: can't find file `project\test.hs'

And indeed the file is no longer there!


--

Comment By: Simon Peyton Jones (simonpj)
Date: 2003-06-18 08:30

Message:
Logged In: YES 
user_id=50165

Fixed by Sigbjorn, by normalising command-line argument path 
names.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=751175group_id=8032
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


RE: @-bindings broken in 6.0?

2003-06-18 Thread Simon Peyton-Jones
Yes, I'm afraid so.  With -fglasgow-exts Template Haskell captures
[t|  ...  |]
and
[p| ... |]
and similarly [d| and [e| 
for quotations. I don't think I'd fully realised that this conflicts
with list comprehensions
[t|t-ts]

(I remember reading a book when I was 10 featuring kids trying to decode
a message that was in two parts mac .. and hine.   Took me ages to
spot machine.)


But maybe this isn't what you found?Better syntax here would be
welcome if anyone can think of some. 

Simon

| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
| On Behalf Of John Meacham
| Sent: 18 June 2003 03:24
| To: [EMAIL PROTECTED]
| Subject: @-bindings broken in 6.0?
| 
| change in list comprehension parsing?
| after I upgraded to ghc 6.0 there were some odd syntax errors on list
| comprehensions which i did not get before, making sure i put spaces
| between all symbols seems to fix them.. was something changed about
how
| they are parsed which breaks code that used to work? just curious.
| John
| --
|

---
| John Meacham - California Institute of Technology, Alum. -
[EMAIL PROTECTED]
|

---
| ___
| Glasgow-haskell-users mailing list
| [EMAIL PROTECTED]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: @-bindings broken in 6.0?

2003-06-18 Thread John Meacham
yes. I use 't' as a variable rather often in this context. and
-fglasgow-exts.  that seems to be it. perhaps it should not interpret it
as the special quotation if the comprehension doesn't end with |]?
John

On Wed, Jun 18, 2003 at 09:04:42AM +0100, Simon Peyton-Jones wrote:
 Yes, I'm afraid so.  With -fglasgow-exts Template Haskell captures
   [t|  ...  |]
 and
   [p| ... |]
 and similarly [d| and [e| 
 for quotations. I don't think I'd fully realised that this conflicts
 with list comprehensions
   [t|t-ts]
 
 (I remember reading a book when I was 10 featuring kids trying to decode
 a message that was in two parts mac .. and hine.   Took me ages to
 spot machine.)
 
 
 But maybe this isn't what you found?Better syntax here would be
 welcome if anyone can think of some. 
 
 Simon
 
 | -Original Message-
 | From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 | On Behalf Of John Meacham
 | Sent: 18 June 2003 03:24
 | To: [EMAIL PROTECTED]
 | Subject: @-bindings broken in 6.0?
 | 
 | change in list comprehension parsing?
 | after I upgraded to ghc 6.0 there were some odd syntax errors on list
 | comprehensions which i did not get before, making sure i put spaces
 | between all symbols seems to fix them.. was something changed about
 how
 | they are parsed which breaks code that used to work? just curious.
 | John
 | --
 |
 
 ---
 | John Meacham - California Institute of Technology, Alum. -
 [EMAIL PROTECTED]
 |
 
 ---
 | ___
 | Glasgow-haskell-users mailing list
 | [EMAIL PROTECTED]
 | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
 
 
 ___
 Glasgow-haskell-users mailing list
 [EMAIL PROTECTED]
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
 

-- 
---
John Meacham - California Institute of Technology, Alum. - [EMAIL PROTECTED]
---
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: How do I find out a function's strictness?

2003-06-18 Thread Sven Panne
Francis Girard wrote:
 [...] Notice however that if I compile with the -prof -auto-all -O
 flags then I got the following error message when I try to examine
 the interface file (with --show-iface) :

 mismatched interface file versions: expected 5043, found 5043p
This has been fixed in GHC 6.x, as a workaround you can use the
undocumented option -buildtag p *before* --show-iface, e.g.
   ghc -buildtag p --show-iface Foo.p_hi

Cheers,
   S.
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: 5.04.3: update_fwd: unknown/strange object

2003-06-18 Thread Simon Marlow
 
 It occurs that we need first to install  ghc-6.0 
 on 
i386-unknown, RedHat Linux platform.
 
 Our administrator says here is a difficulty: 
 
 a) it is hard for us to install from sources,
 b) binary RPM would not do, due to library versions etc.,
 c) we need  
source RPM  distributive,
 
similar as we used when installing  ghc-5.04.3.
 
But  ghc-6.0  does not show any source RPM distributive.
 
 Please, what can we do about this?

Use the nosrc RPM, or install locally in your home directory from the
binary distribution?  (you don't say what version of RedHat you have).

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


TH-Syntax (Re: @-bindings broken in 6.0?)

2003-06-18 Thread Christian Maeder
I think symbols instead of letters in quotations would be better

	[t|  ...  |]
[::| ... |]   (but check [::| before a parallel array [::] )

and
[p| ... |]
[@| ... |]

and similarly [d| 
[{}| ... ]

[e|? That's simply [| ... |]

Christian



___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: isEmptyChan blocks?

2003-06-18 Thread Simon Marlow
 
 I noticed that isEmptyChan blocks if the channel is already
 waited on by readChan, is this the intended behaviour?
 At least I was a bit surprised by a blocking predicate..

I agree this doesn't seem right.  Looking at the implementation though,
I can't see an easy way to fix it - any suggestions?

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


source RPM ghc-6.0

2003-06-18 Thread Serge D. Mechveliani
On Wed, Jun 18, 2003 at 11:40:59AM +0100, Simon Marlow wrote:
  
  It occurs that we need first to install  ghc-6.0 
  on 
 i386-unknown, RedHat Linux platform.
  
  Our administrator says here is a difficulty: 
  
  a) it is hard for us to install from sources,
  b) binary RPM would not do, due to library versions etc.,
  c) we need  
 source RPM  distributive,
  
 similar as we used when installing  ghc-5.04.3.
  
 But  ghc-6.0  does not show any source RPM distributive.
  
  Please, what can we do about this?
 


 Use the nosrc RPM, or install locally in your home directory from the
 binary distribution?  (you don't say what version of RedHat you have).
 


Is this a correct way to detect versions needed for the GHC 
installation? 

  more /etc/redhat-release
  --
  Red Hat Linux release 7.3 (Valhalla)

  ls /lib/libc*  
  --
  /lib/libc-2.2.5.so 
 ... 



 install locally in your home directory from the binary 
 distribution?

Probably, our Linux and library versions are too old to install from 
the binary ghc-6.0 distribution.
Or should I really try this, with the above versions?

This is why we rather need  source RPM,  as our administrator says

(he does not want to update versions too often, 
and personally, I do not understand any in these system matters).

-
Serge Mechveliani
[EMAIL PROTECTED]


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: source RPM ghc-6.0

2003-06-18 Thread Simon Marlow
 Is this a correct way to detect versions needed for the GHC 
 installation? 
 
   more /etc/redhat-release
   --
   Red Hat Linux release 7.3 (Valhalla)
 
   ls /lib/libc*  
   --
   /lib/libc-2.2.5.so 
  ... 

The binary distribution (not the RPM) is basically just a tarball.  It
does no checking that you have the right versions of things, so it is a
use at your own risk.  The download instructions do say that it is
suitable for RedHat 7.2, though, so you might be ok with 7.3.

If you want to build from source, you can use the nosrc RPM.  This is
just like the source RPM, except that the source isn't included.  To
build it, you need to download the source too (your sysadmin should know
how to do this).

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


current CVS version doesn't compile

2003-06-18 Thread Peter Simons
I'm trying to compile the latest version of GHC from CVS on Linux, but
the build reproducibly fails at this point:

main/SysTools.lhs:703:
Couldn't match `IO ExitCode' against `t - t1'
Expected type: IO ExitCode
Inferred type: t - t1
Probable cause: `rawSystem' is applied to too many arguments in the call
(rawSystem pgm real_args)
In a 'do' expression: exit_code - rawSystem pgm real_args
make[2]: *** [stage1/main/SysTools.o] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/local/src/ghc-current/ghc'

Does anyone have an idea what's going wrong here?

Peter

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: @-bindings broken in 6.0?

2003-06-18 Thread Ketil Z. Malde
Simon Peyton-Jones [EMAIL PROTECTED] writes:

 Yes, I'm afraid so.  With -fglasgow-exts Template Haskell captures
   [t|  ...  |]
 and
   [p| ... |]
 and similarly [d| and [e| 
 for quotations.

I had a similar experience when I defined the (?) operator.  Which
obviously clashes with the syntax for implicit paramters, unless
surrounded by spaces.

 But maybe this isn't what you found?Better syntax here would be
 welcome if anyone can think of some. 

I think lumping all these extensions under one switch is the
problem.  I find it hard to do useful stuff without some extensions,
but would rather not be bitten by this kind of things.

Isn't it possible to provide e.g. implicit parameters and template
Haskell as magical modules?  So that import Template enables the
syntax above, and I could use import MultiParameterTCs but not
ImplicitParams, for instance?

Or at least, provide different -fglasgow-exts flags to fine tune which
extensions are being used.

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: current CVS version doesn't compile

2003-06-18 Thread Simon Marlow
 
 I'm trying to compile the latest version of GHC from CVS on Linux, but
 the build reproducibly fails at this point:
 
 main/SysTools.lhs:703:
 Couldn't match `IO ExitCode' against `t - t1'
 Expected type: IO ExitCode
 Inferred type: t - t1
 Probable cause: `rawSystem' is applied to too many 
 arguments in the call
 (rawSystem pgm real_args)
 In a 'do' expression: exit_code - rawSystem pgm real_args
 make[2]: *** [stage1/main/SysTools.o] Error 1
 make[1]: *** [all] Error 1
 make[1]: Leaving directory `/usr/local/src/ghc-current/ghc'
 
 Does anyone have an idea what's going wrong here?

What version of GHC are you compiling with?

Cheers,
Simon
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: current CVS version doesn't compile

2003-06-18 Thread Peter Simons
Simon Marlow writes:

  What version of GHC are you compiling with?

The Glorious Glasgow Haskell Compilation System, version 6.1

I built this version from CVS as well, maybe two or three days before
the 6.0 version was released.

Peter
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: current CVS version doesn't compile

2003-06-18 Thread Simon Marlow
 
 Simon Marlow writes:
 
   What version of GHC are you compiling with?
 
 The Glorious Glasgow Haskell Compilation System, version 6.1
 
 I built this version from CVS as well, maybe two or three days before
 the 6.0 version was released.

We only support compiling the CVS sources with:

  a. A released compiler (i.e. one ending in an even number), or
  b. itself.

So, building with a random 6.1 isn't supported, hence the build error.
You should start from 6.0.

Cheers,
Simon
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: @-bindings broken in 6.0?

2003-06-18 Thread Andy Moran
On Wednesday 18 June 2003 01:04 am, Simon Peyton-Jones wrote:

 Better syntax here would be welcome if anyone can think of some.

Why not add a '|' after the initial '[':

[|t|  ...  |]
and
[|p| ... |]

It may be a little more heavyweight but it is symmetrical (and probably makes 
parsing easier too).

I haven't played with Template Haskell at all, so I don't know if '[|' is 
already a distinguished token.

Cheers,

Andy

-- 
Andy Moran  Ph.  (503) 526 3472
Galois Connections Inc. Fax. (503) 350 0833
3875 SW Hall Blvd.http://www.galois.com
Beaverton, OR 97005[EMAIL PROTECTED]

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


state of ghc6 on sparc

2003-06-18 Thread Isaac Jones
Hello :)

Can anyone enlighten me as to the state of the ghc6 sparc
distribution?  The file on Hal's web page mentioned some time back is
not the same file as on the GHC web page (I note that the filenames
are different also).

Are any of them known to work if installed in a non-standard place?


peace,

isaac
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: state of ghc6 on sparc

2003-06-18 Thread Josef Svenningsson
On Wed, 18 Jun 2003, Isaac Jones wrote:

 Hello :)

 Can anyone enlighten me as to the state of the ghc6 sparc
 distribution?  The file on Hal's web page mentioned some time back is
 not the same file as on the GHC web page (I note that the filenames
 are different also).

 Are any of them known to work if installed in a non-standard place?

Here at Chalmers we use the first shipped version (I believe this is the
one on the GHC web page or an even earlier one...). I patched it myself,
it was very easy. I expect that the version on Hal's web page should work
since he said he fixed the bug.

The only thing that I don't like is that the dist isn't compiled with
readline. It makes working in ghci a nightmare (I need to use backspace
often...). The problem around this is in my opinion to make a Haskell98
compliant trimmed down readline library which doesn't depend on the c
library. It shouldn't be too difficult. I don't expect that people are
using the full power of readline anyway.

Cheers,

/Josef

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: state of ghc6 on sparc

2003-06-18 Thread Simon Marlow
 
 On Wed, 18 Jun 2003, Isaac Jones wrote:
  Can anyone enlighten me as to the state of the ghc6 sparc
  distribution?  The file on Hal's web page mentioned some 
 time back is
  not the same file as on the GHC web page (I note that the filenames
  are different also).
 
  Are any of them known to work if installed in a non-standard place?
 
 Here at Chalmers we use the first shipped version (I believe 
 this is the
 one on the GHC web page or an even earlier one...). I patched 
 it myself,
 it was very easy. I expect that the version on Hal's web page 
 should work since he said he fixed the bug.

Hal's version still has problems, I believe.  He said that he will try
to fix the problems soon.

 The only thing that I don't like is that the dist isn't compiled with
 readline. It makes working in ghci a nightmare (I need to use 
 backspace
 often...). The problem around this is in my opinion to make a 
 Haskell98
 compliant trimmed down readline library which doesn't depend on the c
 library. It shouldn't be too difficult. I don't expect that people are
 using the full power of readline anyway.

Making a working readline isn't that simple - you need to know something
about the terminal properties for one, which means being able to use
termcap or terminfo.

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: ICFP Programming Contest

2003-06-18 Thread Ketil Z. Malde
John Hughes [EMAIL PROTECTED] writes:

 ICFP Programming Contest
 
 
 There are just ten days to go to the sixth ICFP Programming Contest!

This *is* announced to all relevant groups (as in comp.lang.*, at
least)? 

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: In search of: [a-b] - a - [b]

2003-06-18 Thread Graham Klyne
At 20:15 17/06/03 -0400, Derek Elkins wrote:
On Tue, 17 Jun 2003 21:01:57 +0100
Graham Klyne [EMAIL PROTECTED] wrote:
 I'm convinced I've seen a function like this somewhere:
[a-b] - a - [b]
 but cannot remember where.  Or maybe:
Monad m = m (a-b) - a - m b
 ?

 I could roll my own (*), but I'm trying not to duplicate standard
 library functions is I can help it.  Any pointers?
The closest function I see is ap :: Monad m = m (a - b) - m a - m b
That's the one I was trying to remember!  Thanks.

  Also you may want to check out the Haskell
reference at zvon.org, it's indexed by type as well.
Ah!  Very useful.  Thanks again.

  flist :: [a-b] - a - [b]
  flist fs a = map (flip ($) a) fs
or much nicer (IMO)
  flist fs a = map ($ a) fs
Ah, yes, I'd not quite grasped that sections can be used either way round 
like this.  I agree that's much neater, and this way of combining $ and map 
an idiom that I think could be used in other ways.

or breakin' out the point-free style,
  flist = flip (map . flip ($)) -- okay, so I wouldn't recommend this
I keep on reading about this point free style, but can't find any 
discussion of it.  Are there any pointers (sic) ?

#g

---
Graham Klyne
[EMAIL PROTECTED]
PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: In search of: [a-b] - a - [b]

2003-06-18 Thread Keith Wansbrough
 or breakin' out the point-free style,
flist = flip (map . flip ($)) -- okay, so I wouldn't recommend this
 
 I keep on reading about this point free style, but can't find any 
 discussion of it.  Are there any pointers (sic) ?

Search for Squiggol or Bird-Meertens Formalism.  A group of
functional programmers at Oxford.  (Richard Bird and Lambert Meertens
are the ones the formalism was named after).

I see some citations of
  Backus, J. 1978. Can Programming Be Liberated from the von Neumann
  Style? A Functional Style and Its Algebra of Programs, Communications
  of the Association for Computing Machinery 21:613-641.
which appears to be available (as a scan) at, amongst others,
  http://www.stanford.edu/class/cs242/readings/backus.pdf

Another source is

  http://web.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publications/index.html#radix

(Jeremy Gibbons introduced me to the concept when I was an
undergraduate).

This is an introduction to Squiggol:

  
http://web.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publications/index.html#squiggolintro

This style underlies a lot of expert Haskeller's intuitions.  The mass
of cute symbols can drive you crazy, though... see Erik Meijer et
al.'s paper _Functional Programming with Bananas, Lenses, and Barbed
Wire_:

  http://www.cse.ogi.edu/~erik/Personal/classic.htm

Hope this helps.

(going on the Wiki as PointFreeStyle, linked from CommonHaskellIdioms).

--KW 8-)

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Search by type (Re: In search of: [a-b] - a - [b])

2003-06-18 Thread Jon Fairbairn
On 2003-06-17 at 20:15EDT Derek Elkins wrote:
 The closest function I see is ap :: Monad m = m (a - b) - m a - m b
 (so you could write your function as f fs a = ap fs (return a) not that
 I would recommend it).  Also you may want to check out the Haskell
 reference at zvon.org, it's indexed by type as well.

That's useful. It reminds me to ask whether anyone is
working on adding a search by type facility to any of the
haskell systems. I remember a talk by folk from York about
how they did it (years ago), and being impressed, so it
seems a shame that we don't have this now.

 Jón


-- 
Jón Fairbairn [EMAIL PROTECTED]


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: Typesafe MRef's

2003-06-18 Thread oleg

 So what does the function
 insert2 val1 val2 =
let
   (m1,k1) = insert empty (Just val1)
   (m2,k2) = insert m1 (Just val2)
   m3 = update m2 k1 Nothing
in
   isJust (lookup m3 k2)
 return?  It looks to me as if it returns True if val1 and val2 have
 different types, False if they have the same type.

Sorry for the delay: I was out of town. Using the Haskell98
implementation of typesafe MRef posted earlier, the insert2 function
always returns True. To be more precise, the following function,


insert2 val1 val2 =
  let
 (m1,k1) = insert empty () [val1]
 (m2,k2) = insert m1 () [val2]
 m3 = update m2 k1 []
  in
 isJust (lookp m3 k2)

re-written to conform to Simon Peyton-Jones' signature (modulo
renaming of lookup into lookp) and to use lists rather than
Maybes. The universe in the posted code had no maybes, due to my
laziness.

The function continues to always return True even if we replace the
update statement above with
 m3 = update m2 k2 []

The former result is obvious from the fact that keys k1 and k2 indeed
refer to different cells so to speak (at least in the posted
implementation of the Simon Peyton-Jones' signature). Therefore,
updating the cell referred to by k1 has no bearing on the cell
referred to by k2.
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell