Dear GHC experts,
I have another question about the profiling usage in ghc-6.2.2.
I thank Simon Marlow [EMAIL PROTECTED] for the explanations.
We wrote
There was set a single point of {-# SCC isReducibleAtTop #-}.
Why the report prints the two different lines for it?
You removed the
On 26 January 2005 09:13, Serge D. Mechveliani wrote:
The indentation in the profiling report or in the source program?
In the profiling report.
The report prints some function names not from the beginning of the
line ...
Maybe, you can give a simple example of a program with SCC when the
Why is
gfindtype :: (Data x, Data y) = x - Maybe y
and not
gfindtype :: (Data x, Typeable y) = x - Maybe y
?
Jim Apple
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Jim,
Why is
gfindtype :: (Data x, Data y) = x - Maybe y
and not
gfindtype :: (Data x, Typeable y) = x - Maybe y
?
Because you're not always interested in a subterm of the same type as
the parent node.
gfindtype abc :: Maybe Char -- yields Just 'a'
gfindtype abc :: Maybe String -- yields Just bc
Jim,
Why is
gfindtype :: (Data x, Data y) = x - Maybe y
and not
gfindtype :: (Data x, Typeable y) = x - Maybe y
?
Because you're not always interested in a subterm of the same type as
the parent node.
Ouch, answered your question before I really read it, i.e., before a
first cup of coffee.
Typeable is a superclass of Data.
So you would indeed imply Typeable by requiring Data.
However, you don't _need_ Data but only Typeable.
You need Data x to find Typeable y; once you find
y you don't need to _traverse_ any further into y.
To summarise, requiring Typeable is simply more precise
as