Accessing function specifications
Wed Sep 1 18:38:25 CEST 2010
would anybody know if it is possible to access type specification of a
function in the same module at runtime ? And secondly is it possible to
declare different specification for each function clause (yeah, pretty
dirty but the end justifies the means ;) ? To be more specific, I'll
outline my problem:
I have a function with several clauses, each of which returns a list of
tuples of the same size but type of value on particular positions differ
for each clause. Some return 'condensed' tuples with a list on some
position (it virtually represents a set of tuples one would obtain by
making a cartesian product of atomic values with a list, which i do not
want to do because results could be huge and i have functions for
processing this kind of tuples).
I would like to use specifications for functions as input for building
infrastracture for processing their results before actually evaluating
them because it is part of a larger machinery which needs proper
settings (and probably optimisation).
Thank you very much in advance!
More information about the erlang-questions