Sorry, all, I spoke too soon.  A showFun like:

  showFun:: String -> (Int -> Int) -> String

Does not work; what are we to do with showFun ("f", g) where f = g?
Better to eliminate the source of ambiguity:

  showFun:: String -> String

which just takes the function name.  A problem here is that a new
version of showFun must be "implicitly defined" (yechh) in each
module; otherwise we lose referential transparency.  An alternative is
another "implicitly defined" (yechh) variable "here" of type
HaskellContext, so that a single showFun can be called as in:

  showFun (here, "name");

to get a function representation.

All of this is a logical patch, and fairly distasteful from my point
of view.  The attempt here is to make a distinction between the
function (which is the same regardless of how it is defined) and the
function representation or definition (for which "showfun" makes
sense).  The normal Haskell use of the name of a function should be
the former, not the latter; otherwise, we lose many proof rules in the
"normal" case.  Using the string of the name as the function
"designator", which can vary with the declaration, is the only thing
that occurs to me at the moment.

Still groping through nasty kludges in search of a very operational
capability.....

                                        Dave Barton
                                        [EMAIL PROTECTED]

Reply via email to