I'm slightly worried at the idea of a special case for TypeRep. That
doesn't seem right to me - I realise that we're showing the full internal
details of TypeRep here, but the debugger does that for every type. It's a
debugger, it's supposed to show you what's really going on. If we start
adding special cases to get abstraction back again, when do we stop?
I think break024 is doing the right thing, we just need to construct a test
that gives reliable results. Perhaps just avoiding throwDyn is good enough?
Which reminds me - I think the printer defaults to using 'show' when it
knows enough about the type, doesn't it? That behaviour worries me too. I
don't like the idea that it magically switches from raw printing to 'show'
when enough information about the type becomes available.
Cheers,
Simon
Pepe Iborra wrote:
Indeed. I noticed shortly after pushing.
In fact, the term pretty printer used by :print shouldn't output the
contents of TypeRep values.
I was just working on a custom printer for the Term datatype that would
take care of that.
Thanks,
pepe
On 11/09/2007, at 16:59, Simon Marlow wrote:
Pepe Iborra wrote:
Tue Sep 11 03:31:39 PDT 2007 Pepe Iborra <[EMAIL PROTECTED]>
* Accept output
M ./tests/ghc-regress/ghci.debugger/scripts/break024.stdout -6 +10
this test has varying output, e.g. I get the diff below. It's
probably not a good idea to emit raw Typeable key values, because will
tend to change.
Cheers,
Simon
--- ./break024.stdout.normalised 2007-09-11 15:55:28.000000000
+0100
+++ ./break024.run.stdout.normalised 2007-09-11 15:55:28.000000000
+0100
@@ -1,21 +1,17 @@
Left exception :: Main.MyException
Stopped at <exception thrown>
-_exception :: e = DynException (Data.Dynamic.Dynamic
(Data.Typeable.TypeRep (Data.Typeable.Key 2505)
- (Data.Typeable.TyCon (Data.Typeable.Key 2505)
- ('M' : _ : _))
-
[])
- _)
+_exception :: e = DynException _
*** Exception: (unknown)
Stopped at <exception thrown>
-_exception :: e = DynException (Data.Dynamic.Dynamic
(Data.Typeable.TypeRep (Data.Typeable.Key 2505)
- (Data.Typeable.TyCon (Data.Typeable.Key 2505)
- ('M' : 'a' : 'i' : 'n' : '.' : _ : _))
+_exception :: e = DynException (Data.Dynamic.Dynamic
(Data.Typeable.TypeRep (Data.Typeable.Key 2485)
+ (Data.Typeable.TyCon (Data.Typeable.Key 2485)
+ ('M' : 'a' : 'i' : 'n' : _ : _))
[])
_)
*** Exception: (unknown)
Stopped at <exception thrown>
-_exception :: e = DynException (Data.Dynamic.Dynamic
(Data.Typeable.TypeRep (Data.Typeable.Key 2505)
- (Data.Typeable.TyCon (Data.Typeable.Key 2505)
+_exception :: e = DynException (Data.Dynamic.Dynamic
(Data.Typeable.TypeRep (Data.Typeable.Key 2485)
+ (Data.Typeable.TyCon (Data.Typeable.Key 2485)
('M' : 'a' : 'i' : 'n' : '.' : _ : _))
[])
_)
*** unexpected failure for break024(ghci)
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc