In Haskell, is there a way to get the caller function name? Of course I could hard-code it, but that turns into a maintenance burden: If someone were to rename the function, nothing is forcing them to rename the hard-coded name (especially with mass find/replace).
A contrived example:
f1 :: String
f1 = "f1" -- can this be automated?
Aucun commentaire:
Enregistrer un commentaire