[Haskell] wanted: "source_location_of" function
Johannes Waldmann
waldmann at imn.htwk-leipzig.de
Fri May 13 04:53:52 EDT 2005
Dear all,
I have a Haskell program with a textual interface (Textareas in CGI,
actually) where the user has to type/edit representations of Haskell
data in several places (handled with Read/Show, for the moment).
Now for each such input field, I want to add a link to the
haddockumentation or source code of the corresponding data declaration,
and preferrably without changing (much) of the program
it is large, and the interface is generic:
the actual textarea does not know anything about the type of its
contents, other than being an instance of Read and Show.
What would be a good way to obtain this information automatically?
Probably I want a class with a method giving sth. like
source_location_of ( _ :: Data.Map k v ) = [ "Data", "Map" ]
where instances are derived automatically.
Could be done with DrIFT perhaps ...
(But I think I need the package name for the module as well.)
Any ideas or pointers would be welcome.
--
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- http://www.imn.htwk-leipzig.de/~waldmann/ -------
More information about the Haskell
mailing list